How can you create an empty table from an existing table?



How can you create an empty table from an existing table?..

Answer / Aman Saxena

"To create an empty table with the same structure as an existing table in SQL, use the CREATE TABLE AS SELECT * FROM table_name WHERE 0=1 command"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

Can a foreign key be null?

1 Answers  


how to use like conditions? : Sql dba

1 Answers  


What is record data type?

1 Answers  


What is clustered index sql?

1 Answers  


when is the use of update_statistics command? : Sql dba

1 Answers  


Why we use join in sql?

1 Answers  


What is serial sql?

1 Answers  


What is left join in sql?

1 Answers  


what does the t-sql command ident_current does? : Transact sql

1 Answers  


how can we find the number of rows in a table using mysql? : Sql dba

1 Answers  


Explian rowid, rownum? What are the psoducolumns we have?

1 Answers  


How do I send sql query results to excel?

1 Answers  


Categories