Friday, August 16, 2013

SQL quiries and Syntax-Insert Statement

Insert Statement: To Insert Data in Table.

Syntax:
                1.  Insert into TableName Values(Column Values Separated By Comma) ;.
       -Method Insert data in the Table if the data type and no of columns Matches.
                2.  Insert into  TableName( Columns Name separated By Comma) values(Data for particular Column in same Sequence sapearated By Comma);
        -This method Inserts Data For Specified Column in the Table But the Remaining COlumns Must Be Nullable.                 
                3.  Insert into  TableName( Columns Name separated By Comma) 
    (select Data for particular Column in same Sequence sapearated By Comma from  someTableOrView);
       -This method Inserts Data For Specified Column in the Table But the Remaining COlumns Must Be Nullable from A select statement.