How to create a new table from an existing table?

后端 未结 3 728
南笙
南笙 2021-01-25 10:49
dbo.Profile_Updated
  (
     BusinessName VARCHAR,
     ContactName  VARCHAR,
     Address      VARCHAR,
     City         VARCHAR,
     State        VARCHAR,
     Posta         


        
3条回答
  •  醉梦人生
    2021-01-25 10:55

    I assume you just mean SELECT INTO:

    SELECT City, State, Postalcode
      INTO dbo.PostalDB
      FROM dbo.Profile_Updated;
    
    CREATE UNIQUE CLUSTERED INDEX p ON dbo.PostalDB(PostalCode);
    CREATE INDEX ... -- you'll need to fill in these details
    

提交回复
热议问题