此表格與正常模式相反,我不確定如何從中獲取所需的數據。如何使Oracle SQL查詢爲
下面是一些樣本數據,
Value (column) Info (column)
---------------------------------------------
Supplier_1 'Some supplier'
Supplier_1_email '[email protected]'
Supplier_1_rating '5'
Supplier_1_status 'Active'
Supplier_2 'Some other supplier'
Supplier_2_email '[email protected]'
Supplier_2_rating '4'
Supplier_2_status 'Active'
Supplier_3 'Yet another supplier'
...
我需要一個查詢來找到具有最高等級,目前的狀態「有效」供應商的電子郵件。
您可能希望創建一箇中介「供應商」的觀點,以幫助你自己和其他人將來會查詢這張表。 – 2010-09-30 20:17:02
唉,我感到你的痛苦:) – 2010-10-01 03:59:38
親愛的上帝,有人已經服用了EAV並使它變得更糟**。 – 2010-10-01 12:06:20