1
DECLARE
@t TABLE(id int),
@i int;
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near ','.
但使用单独的声明语句工作正常
DECLARE @t TABLE(id int);
DECLARE
@i int,
@str varchar(10);
Command(s) completed successfully.
为什么出现这种情况?表格声明和“通常”变量声明有什么区别?
(+1)听起来很合理 –