Copy the table structure with data
create table emp_copy as
select *
from Employee;
Copy the table structure with out data
CREATE TABLE Table2 AS
SELECT * FROM Table1 WHERE 1=0;
Note: if condition is not validating then it wont copy the data.
- Copying selected columns from another table
AS (SELECT empno, ename
FROM emp);
No comments:
Post a Comment