Facebook

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.

Leave a Reply

Your email address will not be published. Required fields are marked *