how to insert the values in 5 table at a time Using any
single statement ?

Answer Posted / pradeep kumar

INSERT INTO MyTable (FirstCol, SecondCol)
SELECT 'First' ,1
UNION ALL
SELECT 'Second' ,2
UNION ALL
SELECT 'Third' ,3
UNION ALL
SELECT 'Fourth' ,4
UNION ALL
SELECT 'Fifth' ,5

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of attributehierarchyvisible ? : sql server analysis services, ssas

790


Characterize join and name diverse sorts of joins?

682


What is the difference between a unique key and primary key?

685


Explain trigger and trigger types?

734


How many types of local tables are there in sql server?

677






Which tcp/ip port does sql server run on? How can it be changed?

762


When would you use a before or after trigger?

662


What is the maximum number of index per table?

763


What is update locks?

661


What is awe?

742


How do I port a number to sql server?

699


What is the command used to check locks in microsoft sql server?

720


What is the difference between clustered index and primary key?

677


What is difference between commit and rollback when used in transactions?

666


What are the different ways you can create databases in sql server?

774