Pages

Showing posts with label Copying Table structure. Show all posts
Showing posts with label Copying Table structure. Show all posts

6 August 2013

SQL- Copying Structure of Table without copying Data

Q. How to copy the structure of a table without copying the data ?
           It is possible to copy the structure of a table without copying the data. The following below query will help you in achieving this.

Syntax:
SELECT * INTO <TargetTableName> FROM <SourceTableName> WHERE 1=2

 In the below snapshot Customer is a source table from where we are copying the