Showing posts with label sql query for copying one table structure to other table. Show all posts
Showing posts with label sql query for copying one table structure to other table. Show all posts

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

Recent Posts