程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> 編程綜合問答 >> sql-關於oracle 中的查詢問題

sql-關於oracle 中的查詢問題

編輯:編程綜合問答
關於oracle 中的查詢問題

求b表中的的“Aname +Aaspath”不能與b 表的“Bname +Baspath ”相同,問這個sql要怎麼寫

最佳回答:


select *
from A1
where Aname||Aaspath not in (
select Bname||Baspath
from B1
)

select * from A1;
1 少女1 住址1

2 少女2 住址2

3 少女3 住址3

8 少女8 住址8

7 少女7 住址7

select * from B1;
1 少女1 住址1

2 少女2 住址2

5 少女5 住址5

6 少女6 住址6

select *
from A1
where Aname||Aaspath not in (
select Bname||Baspath
from B1
)

3 少女3 住址3

8 少女8 住址8

7 少女7 住址7

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved