mSQL
CREATE TABLE table_name ( col_name col_type [not null [ , col_name col_type [not null )
An Example:
CREATE TABLE emp_details( first_name char(15) not null, last_name char(15) not null, dept char(20), emp_id int primary key, salary int ) |
In this example we are creating a table named "emp_details" (Employee Details).
We are defining the first and last names and giving them the type "char"
(character) with a length of 15 and a "not null" attribute.
We are defining the "dept" (Department) as a 20 length character type.
Finally we are defining the "emp_id" (Employee ID) as an integer and assigning
it as the primary key. We also define the "salary" field as an integer.
Having done this we are ready to insert some data into
these fields.