How do I write a SQL statement that can replicate table without specifying
the data columns? For example, I have Table A with 12 columns, and I want to
create Table B with exactly the same fields and data type. Is there an easy
way out?I believe you just want to copy the data with the same datatypes.
You could try this
SELECT * INTO NewTabel1 from OldTable1
But this will not copy Keys/Contraints/Defaults...
- Sha Anand
"wrytat" wrote:
> How do I write a SQL statement that can replicate table without specifying
> the data columns? For example, I have Table A with 12 columns, and I want
to
> create Table B with exactly the same fields and data type. Is there an eas
y
> way out?|||And if you don't want the data and just the structure.
then use this...
SELECT * INTO NewTabel1 from OldTable1 where 1 = 0|||Thank you for helping.
"Omnibuzz" wrote:
> And if you don't want the data and just the structure.
> then use this...
> SELECT * INTO NewTabel1 from OldTable1 where 1 = 0
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment