Friday, January 5, 2018

How to CREATE TABLE in sql server


This is basic syntax of the CREATE TABLE in sql server

Syntax
CREATE TABLE table_name
(
column_name1 datatype,
column_name2 datatype,
column_name3 datatype,
column_name4 datatype,
)


For Example if you want to create the Student table, the statement would be like,

CREATE TABLE student
(
id int identity(1,1),
name varchar(100),
mobile varchar(10),
age int
)

You can verify if your table has been created successfully by looking at the message displayed like Commands completed successfully.

No comments:

Post a Comment