sql create table from select code example
Example 1: in query in sql
SELECT Id, FirstName, LastName, Country FROM Customer WHERE Country IN (SELECT Country FROM Supplier)
Example 2: sql create table with columns as another table
SELECT * INTO newtable FROM oldtable WHERE 1 = 0;