select 1 from wzgl.tcldjmain t
where not exists (
select 1 from wzgl.tcldjmx m where m.fdjid=t.fdjid
)
where not exists (
select 1 from wzgl.tcldjmx m where m.fdjid=t.fdjid
)
解决方案 »
- tomcat远程无法访问
- java数据结构的问题,不知道是不是应该用hashmap
- 泛型DAO的问题 初学求解..
- 对FreeMarker的疑惑,并求实际例子
- NetBean5.0中文版下载
- 为了学习smartticket,谁能给个j2ee 1.3sdk?
- 新人提问..无分..请高手帮忙..关于JAVA的SWING窗体做成WINDOWS式样的...
- 想学习J2EE,谁能推荐几本J2EE方面的好书啊~
- 帮我设计一下数据库(在线等,谢谢方法合适就给分)
- 请大家推荐几个struts入门的好书或好站点,目前中文资料太少
- hibernate多个实体对应一个实体的映射问题
- 求一个基于javaweb的进销存管理系统
不想不觉得,这写如果要是纯sql用一条查询语句还...select *
from a ,b,c,d
where a.xxid=b.xxid
and a.xxid=c.xxid
and a.xxid=d.xxid
/*不行啊这就是笛卡尔集了*//*
group by 本来想着到上面产生笛卡尔集然后分组去重但是,,,
*/哎 写不出来 太次了,不过不能白想呀总要留点痕迹以后没事回来看看
楼下随便骂 嘿嘿
不想不觉得,这写如果要是纯sql用一条查询语句还...select *
from a ,b,c,d
where a.xxid=b.xxid
and a.xxid=c.xxid
and a.xxid=d.xxid
/*不行啊这就是笛卡尔集了*//*
group by 本来想着到上面产生笛卡尔集然后分组去重但是,,,
*/哎 写不出来 太次了,不过不能白想呀总要留点痕迹以后没事回来看看
楼下随便骂 嘿嘿嘿嘿 我就写写试试哈 不要当真
不想不觉得,这写如果要是纯sql用一条查询语句还...select *
from a ,b,c,d
where a.xxid=b.xxid
and a.xxid=c.xxid
and a.xxid=d.xxid
/*不行啊这就是笛卡尔集了*//*
group by 本来想着到上面产生笛卡尔集然后分组去重但是,,,
*/哎 写不出来 太次了,不过不能白想呀总要留点痕迹以后没事回来看看
楼下随便骂 嘿嘿
不对 上面那不应该产生笛卡尔集啊 我去 是在太次了
select id from A where A.id in (select id from B and A.id in (select id from C) and A.id in (select id from D)2、判断B、C、D表是否有引用A表ID的
select id from A where A.id in (select id from B or A.id in (select id from C) or A.id in (select id from D)觉得题目出得有点模糊,最好能举个例子
select 1
from a ,b,c,d
where a.xxid=b.xxid
and a.xxid=c.xxid
and a.xxid=d.xxid
where a.fid = ?只有在b,c,d,三个表都存在a.fid这个外键时,才返回1
left join b b on a.id = b.baid
left join c c on a.id = c.caid
left join e e on a.id = e.eaid看下有没有值,有的话就存在,没有就没有