Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Script of the week

Every week I will scour the internet for useful SQL scripts and post my favorite on here.

This weeks comes from SQLServerCentral.com :-

Select * Into [New Table Name] From [Table to be copied] Where 1=2

Here you can copy a table structure, without the data, into a new tableĀ - all in one line of code !!

(1=2 is the condition for not copying data).

Thanks to Kaifi !

Comments

No comments.

Leave a Comment

Please register or log in to leave a comment.