What command is used to create a table by copying the structure of another table?
Pradeep
SELECT * INTO New Table FROM Exiting table SELECT * INTO mytable from HumanResources.Employee
We can use :
CREATE TABLE As SELECT Command.Explanation:To copy only the structure the where clause of the SELECT command should have a FALSE statement.Ex:CREATE TABLE newtable as SELECT * FROM exixtingtableWHERE 1 = 2If WHERE condition is true then all the rows satisfying the condition will be copied to the newtable.