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
How to Insert multiple rows with a single insert statement?
What is the name of the Database which IBM mainframe uses?
Can you explain different types of joins?
How to truncate the log in sql server 2012? : sql server database administration
What are the limitations/drawbacks or ssrs 2008 r2?
Does an index slow down updates on indexed columns?
How you can minimize the deadlock situation?
What is the use of builtinadministrators group in sql server? : sql server security
What is the use of commit?
what number files will a information contain in SQL Server? How many forms of information files exist in SQL Server? How many of those files can exist for a single database?
What is Sqlpaging in SqlServer 2005 ?
What do you understand by triggers and mention the different types of it?
What is used to replicate sessions between instances in coldfusion clusters?
Where are full-text indexes stored?
How to get the query of a table in sql server?