I have a specific type of table created using
CREATE TYPE dbo.MyTableType AS TABLE ( Name varchar(10) NOT NULL, ValueDate date NOT NULL, TenorSize smallint NOT NULL, TenorUnit char(1) NOT NULL, Rate float NOT NULL PRIMARY KEY (Name, ValueDate, TenorSize, TenorUnit) );
and I would like to create a table of this type. From this answer it was suggested to try
CREATE TABLE dbo.MyNewTable AS dbo.MyTableType
causing the following error message to appear in my SQL Server Express 2012:
Incorrect syntax next to the keyword 'OF'.
Is this not supported by SQL Server Express? If so, can I create it in another way, for example using DECLARE ?
sql sql-server create-table
gt6989b
source share