我的一张表中有一个'YEAR'列,如果是用IB 5.X的服务器和客户端,Sql操作没有问题,但用7.0,却...出现这样的问题:
操作:
select * from table1 where Year='2001'
问题:
General SQL error.
Token unknown - line 3,character 19 year.
怀疑是不是7.0中把Year作为关键字来用了?或者...?
---------------------------------------------------------------
我没遇到问题,测试如下
create table test(
year char(4)
)
INSERT INTO "TEST" ("year") VALUES ('2002');
INSERT INTO "TEST" ("year") VALUES ('2003');
INSERT INTO "TEST" ("year") VALUES ('2004');
select * from test where "year" = '2002'
---------------------------------------------------------------
用
select * from table1 where table1.year='2002'
或
select * from table1 where "table1.year"='2002'
会如何?
因为 sql_dialet =3 是有日期数据类型, 还是不用 year 为字段名较好.