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
What are the events recorded in a transaction log?
Differentiate between a local and a global temporary table?
What are the new features of sql server 2008 r2 reporting service?
What are different types of raid configurations? : SQL Server Architecture
How do I find my localdb version?
Can two tables have the same primary key?
How to drop an existing table?
What is the maximum number of instances in 32 bit and 64 bit sql server 2012?
how to determine the service pack currently installed on sql server? : Sql server database administration
What happens if date-only values are provided as date and time literals?
What is a DBMS, query, SQL?
What is the difference between the 2 operating modes of database mirroring?
How to convert a unicode strings to non-unicode strings?
What is the temp table?
Explain different types of self contained sub query?