Insert into create new table

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?

Answers


SELECT top 0 *
INTO NewTable
FROM BigTable1
    CROSS JOIN BigTable2

You can use a SELECT INTO TSQL query - see MSDN link.


For T-SQL,

SELECT ...
INTO MyTable
FROM ...

If you have create rights you should be able to use an:

INSERT INTO MyTable SELECT statement to do this.

EDIT:

I had it wrong

SELECT * INTO MYNEWTABLE FROM MYSOURCETABLE

Need Your Help

Is it possible to make server push without using javascript?

javascript html vbscript server-push

Is there some mechanism to provide server push technology using plain HTML, without using javascript (or any other script languages on the client side).