Sunday, August 21, 2011

General Table Definition & Table Creation

Table It's combination of rows,columns and Indexes.. we can perform insertion, deletion, updates on table..

General Syntax for Creating a Table

CREATE TABLE <TABLE NAME>
(
    Column1 <datatype> --- int, varchar(),char(), flloat etc...,
    Column2 <datatype>
    -----
   ------
)

CREATE TABLE SAMAPLE
(
   ID INT,
   COLUMN1 VARCHAR(10)
)

After creating the table we can see the table definition by using the sample query 

Sp_help <table_name> 
         or
Highlight the table and press ALT+F1
         or
Go with the databases and select the database where you created the table and select that table right click on that table click design then we can see the design of the table....

Select database--> select the table -> right click on the table -> select design.....
With these above mentioned commands we can see the deble definition...

No comments:

Post a Comment