select * from (表1 and 表2)where 网卡号=s 表1,表2里都有"网卡号"这个字段,我现在想查一下一个网卡号s是不是在这两个表里面,用一条sql实现select * from (表1 and 表2)where 网卡号=s语法如何实现? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 SELECT * FROM 表1 WHERE 表1.网卡号 = (SELECT * FROM 表2 WHERE 表2.网卡号=s) select * from 表1 where 网卡号=sand exists (select * from 表2 where 网卡号=s) 上面改为:SELECT * FROM 表1 WHERE 表1.网卡号 = (SELECT 表2.网卡号 FROM 表2 WHERE 表2.网卡号=s) 不好意思:是select * from (表1 or 表2)where 网卡号=s 或的关系? select * from table1 where 网卡号=sunion select * from table2 where 网卡号=s 假如两张表的字段不一样,那就取相同的字段就可以了,如有记录就说明有此网卡号存在 select 网卡号 from table1 union select 网卡号 from table2 为什么找出的条数比select 网卡号 from table1 还少?我现在想把两表的网卡号加起来显示出来,如何实现? if @网卡号 in (select distinct 网卡号 from 表1union select distinct 网卡号 from 表2) then//在当中 select * from 表1 where 网卡号 in(select * from 表2 where 网卡号=s) SELECT * FROM T1 A ,T2 BWHERE A.fMac = B.fMac SELECT * FROM T1 A ,T2 BWHERE (A.fMac = B.fMac)AND (A.fMac = :fMac) select * from (select a.* form 表1 a , 表2 b where a.网卡号=b.网卡号) c where 网卡号=:s 散分庆祝 ■■■高手,这样的效果怎么做?■■■ HTTP在线升级代码一段,总是提示连接出错,高手指点指点 控件自适应问题 如何判断当前计算机是否在线,最好有原代码 Delphi6自带的Indy的Demo中的POP3收信的程序为什么收信速度这么慢啊,有没有办法改进啊 关于数据的一个小问题! TSTRINGGRID控件中的格子跳轉是通過TAB鍵的,我想用回車鍵來跳換格子,如何? 非delphi问题-----哪里有友情强档6.02的注册码或注册机? 为什么我用update不更新指定的字段及如何动态组成sql语句 请问:如何向文本文件中插入一条记录....在线等待,高分相赠 高手请指点,难!
and exists (select * from 表2 where 网卡号=s)
SELECT * FROM 表1 WHERE 表1.网卡号 = (SELECT 表2.网卡号 FROM 表2 WHERE 表2.网卡号=s)
是select * from (表1 or 表2)where 网卡号=s 或的关系?
union select * from table2 where 网卡号=s
假如两张表的字段不一样,那就取相同的字段就可以了,
如有记录就说明有此网卡号存在
为什么找出的条数比
select 网卡号 from table1 还少?我现在想把两表的网卡号加起来显示出来,如何实现?
(select distinct 网卡号 from 表1
union
select distinct 网卡号 from 表2) then
//在当中
(select * from 表2 where 网卡号=s)
FROM T1 A
,T2 B
WHERE
A.fMac = B.fMac
FROM T1 A
,T2 B
WHERE
(A.fMac = B.fMac)
AND (A.fMac = :fMac)