adspace


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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the advantages of sql ? : Sql dba

1154


Is inner join faster than left join?

1287


how many tables will create when we create table, what are they? : Sql dba

1155


Does group by remove duplicates?

1120


What is your daily office routine?

2352


What is the current version of postgresql?

1188


what is bcp? When does it used? : Sql dba

1065


How do I remove duplicates in two columns?

1202


What is the best sql course?

1063


Can we use distinct and group by together?

1146


what is collation? : Sql dba

1242


Is primary key clustered index?

1027


define sql insert statement ? : Sql dba

1108


how to escape special characters in sql statements? : Sql dba

1124


how to start mysql server? : Sql dba

1279