2013年12月3日

Sql Server参数化查询之where in和like实现详解

摘要: where in 的参数化查询实现首先说一下我们常用的办法,直接拼SQL实现,一般情况下都能满足需要string userIds = "1,2,3,4";using (SqlConnection conn = new SqlConnection(connectionString)){ conn.Open(); SqlCommand comm = new SqlCommand(); comm.Connection = conn; comm.CommandText = string.Format("select * from Users(nolock) where U 阅读全文

posted @ 2013-12-03 10:25 pauline 阅读(371) 评论(0) 推荐(0) 编辑

导航