-
Junior Member
copy the Table Structure
Hi
I want to copy the structure & all constrains of one table into other table.
There is any Direct query is there without using Sql Scirpt???
-
Expert Member
Re: copy the Table Structure
You have a function called as copy function in SQL server which you can use to copy the structure and all constrains of one table into other table. If you want to make a clone of the same table with structure, constraints and data you can make use of clone function available with SQL server.
-
Junior Member
Re: copy the Table Structure
create table tablename 1 from select * from tablename2
-
Junior Member
Re: copy the Table Structure
Using INTO we can copy..
SELECT TOP 0 * INTO New_Table_Name From Old_Table_Name
The Above query will come only the structure for the table..
If U want to copy with the data then remove the "Top 0 "..
SELECT * INTO New_Table_Name FROM Old_Table_Name
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules