Syntax

Example

Results

The CREATE TABLE statement used in this example created a table with three columns. The first column is used to store integer data. The second column stores string data (of type varchar) up to 255 characters and the third column is used to store date/time information. After the table has been created, you can use other SQL statements, such as INSERT INTO to populate data into this table. If you need to modify the table after it has been created, you could use the SQL ALTER statement. When creating a table, you will most likely need to use constraints to limit the type of data that can go into a table. Constraints can be specified when a table is created or after the table is created using the ALTER TABLE statement. Here is a list of the most common constraints:

Example