string whereClause = string.Empty; foreach (遍历CheckBoxList) { if (选中) { if (whereClause == string.Empty) whereClause += "'" + 取值 + "'"; else whereClause += ",'" + 取值 + "'"; } } if (whereClause != string.Empty) { SqlConnection cn = new SqlConnection(...); string strSQL = "delete from mytable where id in (" + whereClause + ")"; SqlCommand cmd = new SqlCommand(strSQL, cn); cn.Open(); cmd.ExecuteNonQuery(); cn.Close(); }