sql问题语句

来源:百度知道 编辑:UC知道 时间:2024/09/27 15:49:07
表a 房间 附属房间
1
2 3
3
4 1
怎么把房间里不等于附属离间的选出来

select * from a where 房间 not in (select 附属房间 from a)

顺便BS下,楼主不厚道,没分。。。哈哈

select * from table where 房间<>附属房间

说明白点 看不明白你要干什么了?
而且行也不对正