有两张表,table1,table2,其中都有字段a,现在想查询table1.a不存在于table2.a中的信息
我写了两个语句
select table1.* from table1,table2 where table1.a not in table2.a
和select table1.* from table1,table2 where table1.a != table2.a
可是执行后查询的数据只有一条数据且重复n边,不知道何种原因造成,我应该怎么写?
谢谢!
我写了两个语句
select table1.* from table1,table2 where table1.a not in table2.a
和select table1.* from table1,table2 where table1.a != table2.a
可是执行后查询的数据只有一条数据且重复n边,不知道何种原因造成,我应该怎么写?
谢谢!
解决方案 »
- PLSQL 語句,求解释FOR UPDATE的意思
- 隆重推出最方便实用的国产免费的 Oracle 开发工具 - Oracle SQL Handler (免装客户端,跨平台能运行于LINUX及MAC,双语界面)
- 查询速度的怪异问题。
- 表空间限制如何解决?
- 用rownum取数据的问题
- 关于批量更新
- 用脚本create一批新表的问题
- 50分全給了 如果相鄰數據code相同的就用 price / price1 如果相鄰數據不同,則用 c_price / c_price 1
- 表空间!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- 怎样将PL/SQL查询到结果输出到ACEESS文件,求高手指点。
- sql 问题
- 用存储过程创建索引时,提示错误?请指教!
minus
select a from table2
select t1.* from table1 t1 where not exists(select t2.* from table2 t2 where t2.a= t1.a)