sql语句报错1064 - 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 owner at line 1sqlSELECT problem_code problem_title
该错误是由于您使用了MySQL保留关键字“owner”作为列名而导致的。在MySQL中,如果您使用保留关键字作为列名或表名,必须使用反引号(`)将其括起来。
请尝试使用以下修正后的SQL语句:
SELECT problem_code, problem_title, update_time
FROM test_problem_base
WHERE owner = 1 AND (completiom_time IS NULL OR completiom_time = '')
注意,在“owner”之前和之后都添加了反引号。
原文地址: http://www.cveoy.top/t/topic/h19b 著作权归作者所有。请勿转载和采集!