Hi All
how can I Create Table (COPY STRUCTURE TO TableName Only ) From Another
Table In The Same Database
ThanksSELECT *
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" <TAHA105@.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
"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" <TAHA105@.HOTMAIL.COM> wrote in message
> news:uUamQAzBGHA.344@.TK2MSFTNGP11.phx.gbl...
>
No comments:
Post a Comment