Create a table as result of select query

If you want to dump the result of your select query into a table, this query will help in Oracle or MySql.

Create table newTable select * from oldTable where condition=true;

In case of MsSql this will work

Select * into newTable from oldTable where condition=true;

Leave a Reply

Your email address will not be published. Required fields are marked *