This query is useful for create table and copy the schema and data from another table


–This query is useful for create table and copy the schema and data from another table

select * into tbldemo from dbo.tblEmployee

tbldemo-New table which have to create
dbo.tblEmployee-Old table ,Copy schema and data from this table
—Copy only schemaa not data

SELECT *
INTO my_new_table1
FROM tblEmployee
WHERE 1=2
–it will not generate p.k

Advertisements

2 Responses to This query is useful for create table and copy the schema and data from another table

  1. Jon Cromuel says:

    For the reason that the admin of this web page is working,
    no uncertainty very shortly it will be famous, due to its feature contents.

  2. increase server performance…

    […]This query is useful for Create table and copy the schema and data from another table | IT Developer's…..!![…]…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: