How to Copy Structure of One Table into Another Table?

SQL Query to copy structure of one table to another table in SQL Server.

Syntax: Select * into Newtable from Oldtable where 1=2

Ex: Select * into emp1 from emp where 1=2

The above query copies only structure(not data) of emp to emp1.

SQL Query to get structure of table

How To Get Structure of a Table in SQL Server?

SQL Query to view structure of a table in sqlserver.

SP_help tablename

SP_help emp

Recent Posts