I have two large tables and want to combine all of the column names (not as a view) into a new table.
I do not have permission to right click on each table and choose CREATE TO SCRIPT, so I was wondering if there is a way to INSERT both Tables into a new table without specifying the column data types?
INSERT INTO MyTable SELECT statement to do this. INSERT INTO will not create a new table.
For a basic table, click Insert > Table and move the cursor over the grid until you highlight the number of columns and rows you want. For a larger table, or to customize a table, select Insert > Table > Insert Table. Tips: If you already have text separated by tabs, you can quickly convert it to a table.
SELECT INTO Syntax Copy only some columns into a new table: SELECT column1, column2, column3, ... WHERE condition; The new table will be created with the column-names and types as defined in the old table.
SELECT top 0 *
INTO NewTable
FROM BigTable1
CROSS JOIN BigTable2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With