How do you copy a table in sql?



How do you copy a table in sql?..

Answer / Sanjeev Kumar Chauhan

In PostgreSQL, you can use the `CREATE TABLE ... AS SELECT` statement to create a new table and populate it with data from an existing table. For example: `CREATE TABLE new_table AS SELECT * FROM old_table;`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

Can you sum a count in sql?

1 Answers  


What is the difference between sql and t sql?

1 Answers  


How do you break a loop in pl sql?

1 Answers  


I have a package in which a table was used in a procedure and compiled later i have dropped the table used in the package what would be the status of package specification and body

1 Answers   TCS,


Which table is left in left join?

1 Answers  


what is oltp (online transaction processing)? : Sql dba

1 Answers  


what is explain plan?

4 Answers  


What is a database event trigger?

1 Answers  


What is sorting in sql?

1 Answers  


What is attribute indicator in pl sql?

1 Answers  


Explain the difference between 'between' & 'and' operators in sql

1 Answers  


Is it possible to remove child records without removing master table records...the two having pk,fk relationship?

1 Answers  


Categories