MySQL 查询语句错误:'You have an error in your SQL syntax...' 如何解决?
在MySQL中,使用 'not null' 检查列是否不为空是错误的,应该使用 'IS NOT NULL'。
错误语句:
'SELECT * from t_d_sfdreportdetail_base where C_COUNAME not null;'
正确语句:
'SELECT * FROM t_d_sfdreportdetail_base WHERE C_COUNAME IS NOT NULL;'
原文地址: https://www.cveoy.top/t/topic/peKC 著作权归作者所有。请勿转载和采集!