Forum Discussion

AfrazKhan's avatar
AfrazKhan
Copper Contributor
Feb 08, 2019

"Create Table as" clause issue

Hey all there, I am trying to create a new table in MSSQL Server 2017 from two other existing tables. 

Currently, i am using "Create table as" clause but unfortunately it brings syntax error as in below screenshot attached.

But, interestingly, same task is accomplished by using "Select INTO" clause.So my question is that

"Create Table AS" is valid in MSSQL Server or not ? 

2 Replies

  • Anonymous's avatar
    Anonymous

    Hello,

     

       I think, "Create table as" clause is not supported by SQL Server but Azure SQL Data Warehouse is supporting this clause.

     

    you should see the link as follows

    https://docs.microsoft.com/en-us/sql/t-sql/statements/create-table-as-select-azure-sql-data-warehouse?view=aps-pdw-2016-au7

     

    Good days,

     

    AfrazKhan 

Resources