|
rishabhgairola
Starting Member
India
2 Posts |
Posted - 11/30/2012 : 01:03:55
|
hi guys,
I have a table named table1 having columns C1 (PK, int, null) and C2 (datetime, not null). I want to write a query to copy all these columns into a new table after removing all the constraints.
Can anybody provide a solution to this ? thanks in advance. |
|
|
bandi
Flowing Fount of Yak Knowledge
India
1430 Posts |
Posted - 11/30/2012 : 01:27:10
|
Hi,
-- To create duplicate table without data from an Original Table SELECT * INTO DuplicateTable FROM table1 WHERE 1=2 -- If you want data also, then remove WHERE condition
SELECT * FROM DuplicateTable -- Table Without Constraints
-- Chandu |
 |
|