You can create Table in two ways
1) From SQL server Management Studio
2) By Sql Script
Create Table From SQL server Management Studio
1)Go to SQL server Management Studio, select database, open database.
2)Right Click on Table , select "New Table".
3)You will get a new Interface to design table.You can add Column Name and Datatype as may as you want. Every time you fill one entry, another entry will be automatically created.
4)Now "Save" your work.You will get a new prompt .The prompt will ask for table name.
5)Then click on "Ok"
Create Table From Sql Script
1)Go to SQL server Management Studio, select database, open "New Query" window
2)Now write table creation script
Syntax
CREATE TABLE table_name (
column1 datatype ,
column2 datatype,
....
....
);
Here is the script to create student table
Now , run script , table will be added to the database.
1) From SQL server Management Studio
2) By Sql Script
Create Table From SQL server Management Studio
1)Go to SQL server Management Studio, select database, open database.
2)Right Click on Table , select "New Table".
3)You will get a new Interface to design table.You can add Column Name and Datatype as may as you want. Every time you fill one entry, another entry will be automatically created.
4)Now "Save" your work.You will get a new prompt .The prompt will ask for table name.
5)Then click on "Ok"
Create Table From Sql Script
1)Go to SQL server Management Studio, select database, open "New Query" window
2)Now write table creation script
Syntax
CREATE TABLE table_name (
column1 datatype ,
column2 datatype,
....
....
);
Here is the script to create student table
CREATE
TABLE
student
(
id
INT
NOT
NULL,
name
VARCHAR
(500)
NOT
NULL,
age
INT
NOT
NULL,
adress
VARCHAR
(500)
NOT
NULL,
date_of_birth
DATETIME
NOT
NULL,
height
DECIMAL(10,2)
NOT
NULL
)
Now , run script , table will be added to the database.