两个表 A B 用某个id关联(cid) ,现在用户输入一个关键字key='aaa' ,要查询当key='aaa'的时候a表的数据
select * from a where (select key from b where) = key 这样有用不? select * from A a where (select key from b where cid=a.cid) = key 还是这样?
select * from a where (select key from b where) = key 这样有用不? select * from A a where (select key from b where cid=a.cid) = key 还是这样?
解决方案 »
- tomcat启动时出现的严重: Error org.springframework.web.context.ContextLoader加载失败
- 谁能帮我解决一下这个问题,给钱给分都行。tomcat连接池配置问题。
- 求一个oracle的存储过程,使用游标的
- javamail连接异常!!???帮忙
- tomcat显示问题
- 开发web页面与Spark应用程序端进行通讯
- 怎样查看JDBC的版本
- 为什么我下载文件后,文件内容为空?还要设置什么吗?
- 求爱国歌曲-类似屠洪刚“精忠报国”的
- 为何我得不到数据库中的记录!(在线等待)
- 急求一个简单的例子!
- 如何在logic:iterate中用jsp取得bean:write的值
select @a_id=b_id from b where key = 'key'
select * from a where a_id = @a_id
或者
select * from a,b
where b.key='key' and a.id = b.id