Hi,
How to copy table structure without data from one table to another in sql server ?
Copy table structure without data
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rohatash KumarRank #12 · 57.7K reputationPosted Jul 26, 2011, 8:11 PM EDT
If you want to copy the table structure with out copy the data. use the following syntax:
select * into table_5 from table_1 where 1=2;
The above query displays the the structure of the table with out copy of the data. In the above example table_5 is the new table which contain the structure of the already created table table_1.