Use CREATE TABLE when you need a new table for organized data, such as product categories. State the table name, then list each column with its data type inside parentheses. section 18.1.2
CREATE TABLE category (
CategoryID int,
CategoryName varchar(20)
);
This example creates category with an integer identifier and a variable-length category name. section 18.1.2
Commas separate column definitions, just as they separate items in other SQL clauses. The parentheses are required: leaving them out is a common beginner mistake. A successful CREATE TABLE command returns no result rows; instead, the output reports that zero rows were affected. section 18.1.2
Protecting unique rows
A table representing unique entities such as categories, products, orders, or customers can define a named primary key while it is created: CREATE TABLE category ( CategoryID int, CategoryName varchar(20), CONSTRAINT PK_category PRIMARY KEY (CategoryID) ); A multi-column key is also possible, as with an orderitem table using OrderID and ItemID together. section 18.3.2
CREATE TABLE is a starting point rather than a complete table design. Additional properties can be added later, and the next practical step after creating a table is inserting data. section 18.1.2
Reading a table script critically
A payment table might define ID and Author as int, PaymentYear as char(4), and PaymentAmount as decimal(7,2). Reviewing such a script means checking whether its columns, data types, and constraints fit the intended data. section 23.1.1





