1
這是另一個問題的擴展:How to display null value when the record is present more than one time in oracle sql顯示空值
我有一個表中設置像以下:
c_id c_name c_tax
1001 Element1 1
1001 Element1 2
1001 Element2 1
1001 Element2 2
1002 Element3 null
1002 Element4 1
1002 Element4 2
我想在第一column(c_id)
如果顯示null
根據以下條件在第三個column(c_tax)
中出現多次,是或否。
Element1
有兩種稅收1和2.所以Element1
應該顯示一次,c_tax
應該是。 Element3
不含稅,所以應該顯示爲null
。
我的輸出結果應類似於以下內容:
c_id c_name c_tax
1001 Element1 Yes
null Element2 Yes
1002 Element3 No
null Element4 Yes
內部stackoverlow鏈接應粘貼生,而不是使用鏈接的格式。 –