I was asked in viva "how to create a table structure without copying data from a database table?" I was sure of my answer. My answer is: `
CREATE TABLE new_table AS (SELECT *FROM old_table);
Was I right or wrong?
CREATE TABLE new_table AS (SELECT * FROM old_table where 0=1);
No. Your answer is incorrect. You can use this SQL query.
CREATE TABLE *new_table* AS (SELECT *FROM *old_table* WHERE *statement=false*);
The following is an example:
CREATE TABLE *new_table* AS (SELECT *FROM *old_table* WHERE *1=2*);
I think this will serve your purpose ...: P
CREATE TABLE new_table AS SELECT * FROM old_table where 0=1;
where where , , 1 = 2,2 = 3..cc., , "where" false, old_table.