Friday, 20 December 2013

How to insert table values in sql server 2008 R2/ sql insert statement

Posted on 06:12 in
Introduction:
This article is helps to insert table values using sql server in 2008 R2.
Method 1:
INSERT INTO [STUDENTDETAILS([ID],[NAME],[GENDER],[DEPARTMENT])VALUES(<ID, int,>,<NAME, varchar(20),>,<GENDER, varchar(5),>,<DEPARTMENT, varchar(50),>)
Example:
INSERT INTO STUDENTDETAILS ([ID],[NAME],[GENDER],[DEPARTMENT])VALUES(1,'Newton','male','CSE')
INSERT INTO STUDENTDETAILS ([ID],[NAME],[GENDER],[DEPARTMENT])VALUES(2,'Amita','Female','IT')
INSERT INTO STUDENTDETAILS ([ID],[NAME],[GENDER],[DEPARTMENT])VALUES(3,'Allvin','male','MECH')
GO       

SELECT *  FROM STUDENTDETAILS
Method 2:
Step1:
Expand TableàTable àRight ClickàEdit Top 200 Rows

  Step2:
Enter values in table column

0 comments:

Post a Comment