查看: 1008|回复: 5
|
SQL要如何做filter呢。。。
[复制链接]
|
|
有两个table
table 1 & table 2
它们有共同的columns...我要找不同的columns
- table 1
- id, name, address, telephone, fax
- table 2
- id, name, address
复制代码
我要找 telephone 和fax columns...how to do the sql query language...
select * from table1 where = (select * from table2 )
真正的我不懂。。。 |
|
|
|
|
|
|
|

楼主 |
发表于 15-11-2005 11:08 AM
|
显示全部楼层
我要问的是 如果 name 相同就不用display...不同display
table 1
name: james, robert, kim, jule
table 2
name: james , jule
how to display robert and kim....
using sql query...
compare the 2 table columns... |
|
|
|
|
|
|
|
发表于 15-11-2005 12:11 PM
|
显示全部楼层
select name from table1 where name not in (select * from table2) |
|
|
|
|
|
|
|
发表于 15-11-2005 02:00 PM
|
显示全部楼层
原帖由 苦瓜汤 于 15-11-2005 12:11 PM 发表
select name from table1 where name not in (select * from table2)
如果是Mysql的话这个就行不通.. |
|
|
|
|
|
|
|
发表于 15-11-2005 04:00 PM
|
显示全部楼层
原帖由 belon_cfy 于 15-11-2005 02:00 PM 发表
如果是Mysql的话这个就行不通..
我是用MySQL的 |
|
|
|
|
|
|
|

楼主 |
发表于 15-11-2005 06:37 PM
|
显示全部楼层
|
|
|
|
|
|
| |
本周最热论坛帖子
|