How to a Query to copy data from on table to another table.
Answer Posted / dhiraj kumar
we have to use INSERT INTO method.
with the use of this method we can easily transfer records
from one table to another table but both table should have
similar columns or you need to select same no of columns
and datatype as inserting table
example:table A1 having 2 columns emp_name,emp_address
and A2 having 4 column name,address,city,dept
INSERT INTO A1 select name,address from A2.
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Tell me what are cursors and when they are useful?
How to get a list of columns using the "sp_help" stored procedure in ms sql server?
what types of replication are supported in sql server? : Sql server database administration
How is SQL Azure different than SQL server?
How can we check the sql server version?
What is abstracting periodical?
What is change tracking in sql server?
Do you know what is a linked server in sql server?
How to create a view on an existing table in ms sql server?
Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?
What is difference between count (*) and count column?
What are .mdf files?
What is the command used to recompile the stored procedure at run time?
Which tools are available to manage SQL Azure databases and servers?
What is a dataset and what are the different types of datasets?