SQL commands Flashcards

1
Q

2 Types of texts

A

TEXT 225 characters max

MEMO 65536 characters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

3 Whole numbers

A

BYTE 0 to 255
INTEGER -32,768 to 32768
LONG -2.147b to 2.147b

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

2 decimals

A

SINGLE

DOUBLE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

alter the table called movie, and add collumn movieID make it an autoincrimenting primary key

A

ALTER TABLE movie ADD COLUMN MovieID autoincrement primary key;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

make a new table from existing columns, where is optional

A

SELECT column1, column2, … INTO newtable FROM existing_table WHERE condition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Add a new column called PersonID to the person table that contains an automatically increasing
integer value and serves as primary key.

A

ALTER TABLE Person ADD COLUMN PersonID autoincrement primary key;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Create a new table actors_in_movies that contains the columns MovieID (an integer) and PersonID
(also an integer).

A

CREATE TABLE actors_in_movies (MovieID int, PersonID int)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly