简单select语句请大家帮忙看看有什么错误?谢谢

anirvana 2004-07-26 03:16:15
select * from tb1 where m=? and g=? and c=? and id in(select id form tb2 where t=2)
...全文
102 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
anirvana 2004-07-27
  • 打赏
  • 举报
回复
都不行呀
淡蓝冰 2004-07-26
  • 打赏
  • 举报
回复
1﹑form改為from
2﹑?改為%
3﹑不知"="要不要改為"=="
anirvana 2004-07-26
  • 打赏
  • 举报
回复
form已经改成from了
anirvana 2004-07-26
  • 打赏
  • 举报
回复
我用的时MySql,他显示的错误信息跟上面一样。
pressman 2004-07-26
  • 打赏
  • 举报
回复
把你的这个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 的表结构
yown 2004-07-26
  • 打赏
  • 举报
回复
select * from tb1 where m=? and g=? and c=? and id in(select id form tb2 where t=2)

拼写出错:form改为from
zhangzs8896 2004-07-26
  • 打赏
  • 举报
回复
把你的这个sql语句先拷贝到查询分析器,看是什么错!
select * from tb1 where m=1 and g=1 and c=1 and id in(select [id] from tb2 where t=2)
anirvana 2004-07-26
  • 打赏
  • 举报
回复
还是有错误呀: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
WangZWang 2004-07-26
  • 打赏
  • 举报
回复
form改为from

viptiger 2004-07-26
  • 打赏
  • 举报
回复
select * from tb1 where m=1 and g=1 and c=1 and id in(select [id] from tb2 where t=2)
anirvana 2004-07-26
  • 打赏
  • 举报
回复
up

34,872

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧