how to create basic table using script in SQL Server

How to crate basic table in SQL Management Studio using T-SQL

In this step by step SQL tutorial I will show you how to create a table in SQL Server Management Studio 2008 R2 using T-SQL.
 

Syntax: 

Sample:

Below I present the simple table Employee.
My CREATE TABLE statements starts form the table name Employee and after the brackets there are  three fields. I specify data types, and at the end I specify if is Null or Not Null (A NULL means field may not contain a value and NOT NULL means it is mandatory).

 

Below you can see Select statement to show all columns  form the new table Employee.

 

 

 

I hope that helps

Take care

Katie 


SHARE:


No data was returned.


Disclaimer: While every caution has been taken to provide our readers with most accurate information and honest analysis, please use your discretion before taking any decisions based on the information in this blog. Author will not compensate you in any way whatsoever if you ever happen to suffer a loss/inconvenience/damage because of/while making use of information in this blog.