1

Topic: Duplication of the table without its preliminary creation

I have a table, there 100 columns, all different types.
Normally when I should copy the table, I do so

CREATE TABLE [dbo]. [result2] (
[Client] [nvarchar] (50) NULL;
[The TT code] [nvarchar] (50) NULL;
[Production code] [nvarchar] (50) NULL;
[Production name] [nvarchar] (140) NULL;
[Date] [date] NULL;
[Implementation ] [int] null;
[The incorporated marking] [nvarchar] (2) null
)
GO
INSERT INTO [dbo]. [result2]
SELECT [Client]
,[The TT code]
,[Production code]
,[Production name]
,[Date]
,[Implementation ]
,[The incorporated marking]
FROM [AOtest]. [dbo]. [Result1]
/ ***

But if at me hundred columns, I is worn out for everyone creating the table to register data types
Whether there is a simple method to copy the table without creating thus the new.
I.e. sql should create itself the table and fill with its data types, and then copy contents
Something like

insert into result2 select * from oldtable

Only result2 still is not present.

2

Re: Duplication of the table without its preliminary creation

select... into... from