CREATE TABLE newTable AS SELECT * FROM emp WHERE sal > 2000;
insert into newTable SELECT * FROM emp WHERE sal > 2000 ; "to copy the contents"
insert into newTable SELECT * FROM emp WHERE 1> 2 ; "to copy the structure"
with the above statement the contents from the table emp will be copied to temp with the same structure as emp table.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment