Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Table Variable

Author  Topic 

CSK
Constraint Violating Yak Guru

489 Posts

Posted - 2006-06-19 : 05:56:53
Hi All,

While running the statement,


DECLARE @Tmp TABLE
(
Hr_Emp_Id nchar(5) primary key,
Hr_Emp_Name nvarchar(50) NOT NULL,
Hr_Title nchar(3),
Hr_Processed tinyint default 0
)


I got the following error,

Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'TABLE'.

but i am sure this above statement is correct. Y it is through the error

Thanks
KK

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-19 : 06:30:28
It should not lead to error if you use SQL Server 2000
Which version are you using?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -