<delete id="DELETE-PROJECT-COMMON-MEMBER-LIST" parameterClass="String">
          delete research_members where project_id = #projectId#:VARCHAR and is_principal = '0'
</delete>
提示错误:
Check the DELETE-PROJECT-COMMON-MEMBER-LIST-InlineParameterMap. --- Check the statement (update failed). --- Cause: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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 'where project_id = '5454761471293546528297197':VARCHAR and is_principal = '0'' at line 1 Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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 'where project_id = '5454761471293546528297197':VARCHAR and is_principal = '0'' at line 1 
我的程序在where 前夜没有引号啊,为什么会出现引号呢?
请各位帮忙,多谢了

解决方案 »

  1.   

    这个不是引号的问题,引号只是打印错误日志的格式,project_id = '5454761471293546528297197':VARCHAR and is_principal = '0'说这里有语法错误,去掉:VARCHAR再试试。
      

  2.   

    改后是啥样的?这样?
      delete research_members where project_id = #projectId# and is_principal = '0'
    改后的完整错误信息是啥?
      

  3.   


    delete research_members where project_id = '5454761471293546528297197':VARCHAR and is_principal = '0'先把这条SQL放SQLyog里执行下看通不通再说吧,不通就百度,谷歌.. 通之
    然后你再改对应的SQL就没问题了
      

  4.   

    把:VARCHAR去掉,delete写不明白吗
      

  5.   

    把varchar去掉后,提示错误如下:
    check the manual that corresponds to your MySQL server version for the right syntax to use near 'where project_id = '5454761471293546528297197' and is_principal = '0'' 
    声明:我用的是ibatis连接mysql
      

  6.   

    照着6楼说的,去你的MySQL环境里把这条SQL运行一次,看看是不是表名错了,字段名错了,或者需要delete from 表 有的数据库直接delete table 就可以 我不知道mysql行不行。
      

  7.   

    parameterClass中写成"java.lang.string"看看
      

  8.   

    parameterClass中写成"java.lang.string"看看
      

  9.   

    parameterClass中写成"java.lang.string"看看