sql語句 求救!

Javalga發表於2004-09-27
使用sql語句select * from table where xxx=xxx
後邊還可以帶更多條件如 where xxx=xxx or xxx=xxx1 or xxx=xxx2
如果我一次取得xxx xxx1 xxx2 如何把他賦給sql 語句

倘若用迴圈

sql="SELECT MineName, SensorNum, Address,SensorCode, RTData, RTStatus, TimeVal, SensorName, Type FROM show_realtime_data where"
下邊我該怎麼寫?          
for (int i = 0; i < info.size(); i++) {
            String kbh = (String) info.get(i);
            query.append(" MineNum= '"+kbh+"' or MineNum = '"+kbh+"'");
          }
            System.out.print(query);
        }

我這樣肯定不對
請高手指點一下,謝謝了