我有兩個表:選擇查詢,聯合其他表號字段集合場
表:商店
----------------------------------------------
store_cd store_nm active material_cat_ids
---------------------------------------------
L Store(L) Y 20,5
B Store(B) Y 7
而且 表:Material_category
----------------------------------------------------------
material_cat_id name active
----------------------------------------------------------
20 Material Category type A Y
5 Material Category type B Y
7 Material Category type C Y
現在我需要加入在兩個表(stores
和material_category
)之間。以stores
作爲集合具有material_cat_ids
而material_category
表具有作爲數字字段的material_cat_id
,我不能使用「in」關鍵字。
請建議加入這些表的最佳方式。
感謝的建議,我應該改變我的結構,它是對我好 –