Hints
create table used to create table in database.Table has columns and rows structure.When creating a table given parameters are table name, column names and its datatype, size of the column.
In the following example you can able to see the parameters.Data types -int,nvarchar,varchar,datetime,double etc..,
|
create table tableName(
columnName1 dataType(size) null(or) not null,
columnName2 dataType(size) null(or) not null,
columnName..n dataType(size) null(or) not null);
|
Create the tables Customers and Orders with the following columns.
(do not declare the corresponding primary and foreign keys)
create table Customers(
Customerid char(5) not null,
CompanyName varchar(40) not null,
contactName char(30),
Address varchar(60),
City char(15),
Phone char(24),
Fax char(24));
create table Orders(
Orderid int not null,
CustomerId char(5) not null,
Orderdate datetime,
Shippeddate datetime,
Freight money,
Shipname varchar(40),
Shipaddres varchar(60),
Quantity int );
|