Usually, when we want to copy table, we use this command:
CREATE TABLE bck_customer AS
SELECT * FROM customers;
But I intended to copy a table, only copy the structure without data that already in the table.
So i have to modify that sql to do that, then the command:
CREATE TABLE bck_customer AS
SELECT * FROM customers
WHERE 1 = 2;
Filed under: Oracle | Tagged: copy table, Oracle, table structure | 2 Comments »