0

It's strange or I am new? Here is a simple create table as select causing an error in SQL Server 2008.

CREATE TABLE [SalesOrderHeader2]
AS
    (SELECT *
     FROM [AW].[sales].SalesOrderHeader)

Error:

Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'as'.

No error in oracle:

create table abc AS 
select * from abc2
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Muhammad Nadeem
  • 368
  • 4
  • 7
  • 21

1 Answers1

6
SELECT * INTO New_Table 
FROM YourTable
Alfaiz Ahmed
  • 1,698
  • 1
  • 11
  • 17