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 choose all records from the table?
In my application I have a process which picks the scanned files (tif format) from a shared location and it links to application and shown on it.The actuall issue is that my process picks the file before it is completly written or scanned which results in displaying few parts of the image or incomplete image.I need to check if the file is not completly scanned or written then do not link it to application.Please help if any body tell me that how can i check that file is in written phase or locked through DTS.thanking you in advance
Differentiate sql server reporting services vs. Crystal reports?
Explain difference between control flow and data flow?
What is t-sql script to take database offline – take database online.
Tell me what do we need queues in sql service broker?
What is the dbcc command and why is it used?
How to write character string constants or literals in ms sql server?
Explain what is use of dbcc commands?
Is it possible in sql table to have more than one foreign key?
Explain a checkpoint?
What is sql view?
Write a SQL query in order to merge two different columns into single column?
Explain atomicity?
How to return the top 5 rows from a select query in ms sql server?