How to copy data from one table to another table?

          

Interview questions

SQL Server - How to copy data from one table to another table?

Next>>         SQL Server tutorial  

SQL Server - How to copy data from one table to another table? - Feb 27, 2010 at 11:50 AM by Shuchi Gauri

How to copy data from one table to another table?

Ways to copy data from one table to another:

INSERT INTO SELECT: Used one needs to copy data from a table to another empty table. Most beneficial if the columns of both the tables are exactly the same.

SELECT INTO: Used when one needs to create a new table with data as a replica of another existing table.

SQL Server - How to copy data from one table to another table? - May 05, 2009 at 22:00 PM by Rajmeet Ghai

How to copy data from one table to another table?

Data from one table can be copied into another using the INSERT INTO clause.

synatx:

INSERT INTO table_name (coulumn names) FROM table_name

SQL Server - How to copy data from one table to another table? - June 21, 2009 at 09:00 AM by Amit Satpute

INSERT INTO SELECT:

  • To be used when table are yet to be already created.
  • Can be used when data has to be inserted from a table to another table.
  • Columns need not be listed if if those in the select and the insert are same.

SELECT INTO:

  • To be used when tables have not been created.
  • It is used when data from one table is to be inserted into newly created table from another table.


Next>>

Also read

Define database objects.

Answer - SQL Server database stores information in a two dimensional objects of rows and columns called table......

XML Data type implementation in SQL Server 2005

What is Untyped XML?
Provide examples for : Create a table with a untype XML column, Insert into an untyped XML data type column
What is typed XML?
The XML data type comes with five methods. Explain them
Differentiate between Untyped XML and Typed XML.
Explain with an example how to apply defaults constraint to an XML data type column.
You can add constraints to XML data type columns. Illustrate with an example.

Sql Server database maintenance

Explain the concepts of faster differential backups.
Explain the concepts of Parallel Database consistency check (DBCC)
Define Indexed view.
Define Distributed partitioned views.

Transferring Data to a Microsoft Excel File

This chapter shows you how to create a package that can transfer data from a table in an SQL Server 2005 Server database to a Microsoft Excel Spreadsheet. You will also learn how to use a Character Map Data Transformation...........



Write your comment - Share Knowledge and Experience


 

 
Latest placement tests
Latest links
 
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring