I am trying to create a table type in sql server 2008 R2 for use in TVP in stored procs. But I am getting this error as
Incorrect syntax near the keyword 'AS'.
CREATE TYPE LocationTableType AS TABLE
( LocationName VARCHAR(50)
, CostRate INT );
GO
This is the MSDN example. Please help me in understanding what is going wrong.