|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Create TableHi All
how can I Create Table (COPY STRUCTURE TO TableName Only ) From Another Table In The Same Database Thanks SELECT *
INTO newTable FROM oldTable WHERE 1 = 0; Better yet, store your CREATE TABLE scripts in source control instead of relying on this. Because you will not get any indexes, constraints, keys, identity properties, statistics, extended properties, etc. A Show quote "TAHA" <TAHA***@HOTMAIL.COM> wrote in message news:uUamQAzBGHA.344@TK2MSFTNGP11.phx.gbl... > Hi All > how can I Create Table (COPY STRUCTURE TO TableName Only ) From Another > Table In The Same Database > Thanks > > > Thank you Aaron
Show quote "Aaron Bertrand [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message news:OuEgpGzBGHA.984@tk2msftngp13.phx.gbl... > SELECT * > INTO newTable > FROM oldTable > WHERE 1 = 0; > > Better yet, store your CREATE TABLE scripts in source control instead of > relying on this. Because you will not get any indexes, constraints, keys, > identity properties, statistics, extended properties, etc. > > A > > > "TAHA" <TAHA***@HOTMAIL.COM> wrote in message > news:uUamQAzBGHA.344@TK2MSFTNGP11.phx.gbl... >> Hi All >> how can I Create Table (COPY STRUCTURE TO TableName Only ) From Another >> Table In The Same Database >> Thanks >> >> >> > > |
|||||||||||||||||||||||