我现在写了下面的sql就不成功
"SELECT * FROM note_9 WHERE updated_time > :sql_last_value AND updated_time < NOW() ORDER BY updated_time DESC union all SELECT * FROM note_8 WHERE updated_time > :sql_last_value AND updated_time < NOW() ORDER BY updated_time DESC"
报错信息
Exception when executing JDBC query {:exception=>"Java::JavaSql::SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'union all SELECT * FROM note_8 WHERE updated_time > '1970-01-01 08:00:00' AND up' at line 1"}
1 个回复
Kevin_23 - 渣渣源
赞同来自: