Create Table from existing table

Without DataSelect * 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 DataSelect * INTO tbemp2 from tbemp With ConditionSelect * INTO tbemp3 from tbemp where depcod=102 Here depcod denotes to department code.

Get duplicate record from table

Get duplicate records from tableSelect ename from tbemp a where a.eno!=(select Max(eno) from tbemp b where a.ename=b.ename) Here eno denotes to employee number and ename denotes to employee name.