c# 操作数据技巧
#List拼接SQL中in条件
⼀、拼接字符串类型的字段
string sql = @"select distinct ziduan from tablename where ziduan in ('{0}')";
sql=string.Format(sql, string.Join("','", list.ToArray()));
⼆、拼接数字类型的字段
string sql = @"select distinct ziduan from tablename where ziduan in ({0})";
sql=string.Format(sql, string.Join(",", list.ToArray()));