1、循环数组,将数组内容拼成字符串,格式为:'q','b','csd'string str = "'q','b','csd'";string strSQL = "select * from table where a in (" + str + ")";2、循环数组时写SQL: 循环到 q 时:select * from table where a='q' union
循环到 b 时:select * from table where a='b' union
循环到 csd 时:select * from table where a='csd' union
再把最后的union去掉即可