Ask Question
Best of Answers
Usually what we do is USE Your_DB GO INSERT INTO DummyTable (Col_1, Col_2) VALUES ('First',1); INSERT INTO DummyTable (Col_1, Col_2) VALUES ('Second',2); INSERT INTO DummyTable (Col_1, Col_2) VALUES ('Third',3); GO Above the clause INSERT INTO is repeated many times. Another way is to use UNION ALL and INSERT INTO … SELECT… clauses. USE Your_DB GO INSERT INTO DummyTable (Col_1, Col_2) SELECT 'First' ,1 UNION ALL SELECT 'Second' ,2 UNION ALL SELECT 'Third' ,3 GO
Asked by Meril Jeffery John in Software   Answered by Meril Jeffery John
Active Questions
Recent
There are no Questions
Closed Questions
Recently Closed
How to insert multiple values in table using only one insert?
1 Answers
20.08.2017 · From Meril Jeffery John
How to find the second highest salary?EMPLOYEE table has fields EMP_ID and SALARY how do you find the second highest salary?
1 Answers
06.05.2017 · From Meril Jeffery John
How to find the Nth highest salary from a table in SQL?
1 Answers
06.05.2017 · From Meril Jeffery John