I have written few articles about different types of INSERT statement in SQL Server, SQL Server 2008 came up with many enhancements in T-SQL and developer convenience. There is one enhancement in the way you use INSERT statement.
This new feature called “Raw Constructor” which will be helpful to specify more than one raw in VALUE clause of INSERT statement.
CREATE TABLE emps
(
Name VARCHAR(50),
Dept VARCHAR(10),
Company VARCHAR(15)
)
--INSERT records with multiple RAW in VALUE clause
INSERT INTO emps (Name,Dept,Company) VALUES
('Ritesh','MIS','chem'),
('Bihag','MIS','chem'),
('Rajan','acct','mar')
Reference: Ritesh Shah
http://www.sqlhub.com
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of http://www.SQLHub.com
0 comments:
Post a Comment