select * from tb1 where m=1 and g=1 and c=1 and id in(select [id] from tb2 where t=2)

解决方案 »

  1.   

    还是有错误呀:java.sql.SQLException: Syntax error or access violation,  message from server: "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 'select [id] from tb2 where t=2)' at l
      

  2.   

    把你的这个sql语句先拷贝到查询分析器,看是什么错!
    select * from tb1 where m=1 and g=1 and c=1 and id in(select [id] from tb2 where t=2)
      

  3.   

    select * from tb1 where m=? and g=? and c=? and id in(select id form tb2 where t=2)拼写出错:form改为from
      

  4.   

    把你的这个sql语句先拷贝到查询分析器,帖出完整的错误信息来!
    select * from tb1 where m=1 and g=1 and c=1 and id in(select [id] from tb2 where t=2)或者给出TB1 TB2 的表结构
      

  5.   

    我用的时MySql,他显示的错误信息跟上面一样。
      

  6.   

    1﹑form改為from
    2﹑?改為%
    3﹑不知"="要不要改為"=="