click below
click below
Normal Size Small Size show me how
SQL Learning 2
Creating a Table and Inserting Data- Khan Academy Video 2
Term | Definition |
---|---|
What does each column need when you are creating it? | Each needs a name and a data type |
2 Data types in this video | TEXT, INTEGER |
Why is a unique identifier for each row required? | Because you cannot rely on regular column values to return the exact row you want when there are multiple rows which can have the same value, and the value of rows can be modified. |
What data type is the unique identifier written with? | It is written using the primary key data type |
Where is the unique identifier normally placed in a table? | By convention, it is the first column. |
What order should you insert values into a column? | Insert by the order of the columns from first to last. |
Sample code creating a table | CREATE TABLE table_name (column_names data_types); |
Sample code when inserting data | INSERT INTO table_name VALUES(data); |