声明表变量时关键字表附近的语法不正确 [英] Incorrect syntax near the keyword table when I declare a table variable
本文介绍了声明表变量时关键字表附近的语法不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Sybase 数据库 ISQL.exe.当我使用这个子句声明一个表变量时:
I am using Sybase database ISQL.exe. when I declare a table variable using this clause:
declare @tabVar table (fid int, name varchar(10))
我遇到错误:无法执行语句.关键字 'table' 附近的语法不正确
I got error: could not execute statement. Incorrect syntax near the keyword 'table'
我不知道哪里出了问题,有人可以帮忙吗?
I don't see where is wrong, could any one help?
推荐答案
这不是正确的构造.您不能在 sybase 中使用表类型变量.对于这个解决方案,我建议使用如下临时表:
It's not correct construction. You can't use table type variable in sybase. For this solution I suggest to use temporary table as below:
create table #tabVar
(
fid int,
name varchar(10)
)
这篇关于声明表变量时关键字表附近的语法不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文