日期:2014-05-16 浏览次数:20400 次
delete from table where FromPT=‘a’ and id in (1,2,3,4)
string sql = "exec('DELETE FROM [Nop_Customer_CustomerRole_Mapping] WHERE FromPT=@FromPT and CustomerID in ('+@CustomerIDs+')')";
SqlParameter[] paras = { new SqlParameter("@FromPT",FromPT)
,new SqlParameter("@CustomerIDs", CustomerIDs)};
string sql = "exec('DELETE FROM [Nop_Customer_CustomerRole_Mapping] WHERE FromPT='+@FromPT+ ' and CustomerID in ('+@CustomerIDs+')')";
SqlParameter[] paras = { new SqlParameter("@FromPT",FromPT)
,new SqlParameter("@CustomerIDs", CustomerIDs)};