How to create a new table from existing table in postgresql?



How to create a new table from existing table in postgresql?..

Answer / Sharad Kumar Omkar

"To create a new table from an existing one in PostgreSQL, you can use the CREATE TABLE AS SELECT (CTAS) command. Here's an example:nn```sqlnCREATE TABLE new_table AS SELECT * FROM existing_table;```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Postgre Interview Questions

What is pgadmin 4 written in?

1 Answers  


How do I delete a postgres database?

1 Answers  


What is a schema example?

1 Answers  


What is dummy table?

1 Answers  


What is the latest version of postgresql?

0 Answers  


What is postgresql dba?

1 Answers  


Does postgres support clustering?

1 Answers  


Is postgresql a database?

1 Answers  


Is edb postgres free?

1 Answers  


How does clustering in improving the performance?

1 Answers  


Does PostgrSQL support Column constraints? If so how is it done?

1 Answers  


Is pgadmin open source?

1 Answers  


Categories