Wednesday, April 10, 2013

Create New Table in SQL Server 2008

Create New Table by Wizard
 This is a way to create Table in SQL Server 2008. Please, follow the step

- Click on Database which we created
    . Choose Table
      + Right Click on Table Choose "New Table"














  



     + It shows structure of Table such as ColumnName, Data Type, and Allow Nulls
        - ColumnsName is field which we put the name of colunms in table
          Ex: StudentID, Name, Sex,YOB................................etc.
        - Data Type is field which choose type ot data for column
         Ex: nvarchar,int ,nvarchar.........etc.
        - Allow Nulls is the permission for column when we created it we want those column Null or not Null depend on Creater
please, see picture below












  



   


   +  Put the Name for New Table
          - Ex: New Tale : TblStudentInformation

















 


    +  Finished
















Create New Table by TSQL
- Sytax: Create Table TableName(ColumnsName1 DataTye PRIMARY KEY CLUSTERED ,ColumnsName2 DataTye,................................)

- See Example below:










No comments:

Post a Comment