請幫助這兩份報表列混合到一個說法:usa'`MySQL的 - 混合兩種說法
SELECT * FROM inventory WHERE
pro_status='1' or
pro_status='2'
SELECT * FROM inventory WHERE
loca_city= 'tw' or loca_city
=」我需要陳述1的結果來做陳述2.
//Property Status -0=suspended;1=valid(NORMALl);2=valid(GOOD);3=no/wrong number. Data Base ref pro_type loca_city pro_statusRemarks: 00001 Industrial HK 0 00002 Industrial TW 2 00003 Commercial HK 2 00004 Retail TW 0 00005 Others HK 2 00006 Retail HK 2 00007 Others HK 2 00008 Retail USA 2 00009 Retail HK 1 00010 Retail HK 1 00011 Retail TW 2 00012 Retail HK 2 00013 Retail HK 2 00014 Retail HK 2 00015 Retail HK 2 00016 Commercial HK 1 00017 Retail HK 1 00018 Others HK 1
需要的結果是:
ref pro_type loca_city pro_statusRemarks: 00002 Industrial TW 2 00008 Retail USA 2 00011 Retail TW 2
如果使用 SELECT * 從庫存 WHERE'pro_status' = '1' 或'pro_status' ='2'或'loca_city' ='hk'或'loca_city' ='tw'或'loca_city' ='usa' **結果將包含'pro_status' ='0'記錄。 – Jspang001