目录
环境
系统平台:N/A
版本:5.6.5,4.3.4.7,4.7.8
症状
sql语句报错如下:
highgo=# select * from abc where 1 < > 2; ERROR: 42601: syntax error at or near ">" LINE 1: select * from abc where 1 < > 2; ^ highgo=# select * from abc where 1 < = 2; ERROR: 42601: syntax error at or near "=" LINE 1: select * from abc where 1 < = 2; ^ highgo=# select * from abc where 1 > = 2; ERROR: 42601: syntax error at or near "=" LINE 1: select * from abc where 1 > = 2; ^ |
问题原因
HGDB 比较操作符之间不允许有空格, Oracle 比较操作符之间可以有空格 。
解决方案
去掉比较运算符中间的空格即可。
highgo=# select * from abc where 1 >= 2; int ----- (0 rows) highgo=# select * from abc where 1 <= 2; int ----- 1 2 3 (3 rows) |
更多详细信息请登录【瀚高技术支持平台】查看瀚高技术支持平台