Search:     Advanced search
Browse by category:
C/C++   |   Java   |   Oracle/Database   |   SAP   |   ASP .NET   |   Mainframe-DB2   |   Freshers

How to copy data from one table to another table?

Add comment
Views: 190
Votes: 0
Comments: 0
There are multiple ways to do this.

1) INSERT INTO SELECT

This method is used when table is already created in the database earlier and data is to be inserted into this table from another table. If columns listed in insert clause and select clause are same, they are not required to list them.

2) SELECT INTO

This method is used when table is not created earlier and needs to be created when data from one table is to be inserted into newly created table from another table. New table is created with same data types as selected columns.
Others in this Category
document What is Aggregate Functions?
document What are synonyms?
document How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?
document What is an execution plan? When would you use it? How would you view the execution plan?
document What is De-normalization?
document What is difference between DELETE & TRUNCATE commands?
document Q: Please explain the concepts of transaction, commit and rollback
document How can we rewrite sub-queries into simple select statements or with joins?
document Q: What are logical databases? What are the advantages/disadvantages of logical databases?
document What is LINQ?
» More articles



RSS