Insert into create new table

后端 未结 4 575
没有蜡笔的小新
没有蜡笔的小新 2021-02-13 01:39

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 t

相关标签:
4条回答
  • 2021-02-13 02:05

    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
    
    0 讨论(0)
  • 2021-02-13 02:06
    SELECT top 0 *
    INTO NewTable
    FROM BigTable1
        CROSS JOIN BigTable2
    
    0 讨论(0)
  • 2021-02-13 02:26

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

    0 讨论(0)
  • 2021-02-13 02:31

    For T-SQL,

    SELECT ...
    INTO MyTable
    FROM ...
    
    0 讨论(0)
提交回复
热议问题