Title - CREATE SQL statements Tags - sqlstatements sql
CREATE statements are used to create new tables in a database.
Example:
CREATE TABLE celebs ( id INTEGER, name TEXT, age INTEGER );
This statement would create a new table called celebs. It would create three columns. One called ‘id’ with the integer data type, one called ‘name’ with the text data type, and one called ‘age’ with the integer data type.
Before creating new tables in the database, first see whether a table of the same name already exists. In this example, by running the statement:
SELECT * FROM celebs;