各位高手,这个SQL语句什么问题?
DELETE FROM 表1 WHERE L_BHZNH = '345' AND L_VGXLS NOT (SELECT REPLACE(program_name,'123','') AS L_VGXLS FROM 表2 WHERE dbid=db_id() AND program_name LIKE ('nn%'));
提示第一行'('附近有语法错误
[解决办法]
是不是缺少了in?
[解决办法]
AND L_VGXLS NOT IN
[解决办法]
DELETE FROM 表1 WHERE L_BHZNH = '345' AND L_VGXLS NOT in (SELECT REPLACE(program_name,'123','') AS L_VGXLS FROM 表2 WHERE dbid=db_id() AND program_name LIKE ('nn%'));