SQL commands Flashcards
2 Types of texts
TEXT 225 characters max
MEMO 65536 characters
3 Whole numbers
BYTE 0 to 255
INTEGER -32,768 to 32768
LONG -2.147b to 2.147b
2 decimals
SINGLE
DOUBLE
alter the table called movie, and add collumn movieID make it an autoincrimenting primary key
ALTER TABLE movie ADD COLUMN MovieID autoincrement primary key;
make a new table from existing columns, where is optional
SELECT column1, column2, … INTO newtable FROM existing_table WHERE condition
Add a new column called PersonID to the person table that contains an automatically increasing
integer value and serves as primary key.
ALTER TABLE Person ADD COLUMN PersonID autoincrement primary key;
Create a new table actors_in_movies that contains the columns MovieID (an integer) and PersonID
(also an integer).
CREATE TABLE actors_in_movies (MovieID int, PersonID int)