How to insert multiple rows with a subquery?



How to insert multiple rows with a subquery?..

Answer / Sukeerti Suresh

To insert multiple rows using a subquery in SQL Server, you can use the INSERT INTO SELECT statement. For example: INSERT INTO your_table (column1, column2) SELECT column1, column2 FROM other_table WHERE condition.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is the role that is required for killing a process What is the role that is required for creating a linked server

1 Answers   CarrizalSoft Technologies, IBM,


Can you please explain the difference between function and stored procedure?

1 Answers  


How can you start sql server in different modes?

1 Answers  


What is the command used to recompile the stored procedure at run time?

1 Answers  


What is SQL Server?

1 Answers   Atos Origin,


What stored by the model? : sql server database administration

1 Answers  


In what sequence sql statement is processed?

1 Answers  


Suppose i have one sql query that contains 2 minute to execute.After one weekly i am executing same query that is taking 5 minute.Why our same query is taking more time.what would be my approach to reduce execution time.Please help.

1 Answers   Cognizant, HCL, Value Labs,


what is the difference between procedure and function.

4 Answers   Thomson,


explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

0 Answers  


Explain concepts of analysis services?

1 Answers  


Explain the dbcc pintable command when would you use it?

1 Answers  


Categories