|
Main » 2012 » September » 3 » Create Table from existing table
9:38 PM Create Table from existing table |
Without Data Select * INTO tbem1 from tbemp where 1=2
Why 1=2? Because none of the record could satisfy this condition i.e. 1=2. So no data would be copied into newly created table.
With Data Select * INTO tbemp2 from tbemp
With Condition Select * INTO tbemp3 from tbemp where depcod=102
Here depcod denotes to department code.
|
Category: Database |
Views: 2306 |
Added by: Admin
| Tags: with, Structure, From, Other, Copy, Data, table, Another, existing, create
| Rating: 0.0/0 |
|
|
|