Create Table by Copying Structure of Existing Table

create-table, sql, sql-server, ssms

Solution

like this, however this will not create indexes and constraints

select * into Drop_Centers_Detail
from Centers_Detail
where 1 = 0

Problem

I am trying to create a new table by copying an existing table in SQL Server 2008 using Management Studio. The existing table contains no data. I am using the following code but am receiving an error for Incorrect Syntax near AS. I am not sure what is wrong here. I am a SQL newb and any help would be appreciated. Thanks. ``` CREATE TABLE Drop_Centers_Detail AS (Select * From Centers_Detail) ```

Original source