List<SqlParameter> paras = new List<SqlParameter>(); string wherSql = PreWhereSQL + GetQuerySql(paras); string GetQuerySql(List<SqlParameter> paras) { StringBuilder where = new StringBuilder(" and 1=1"); if (!string.IsNullOrEmp
exec sp_ExecuteSql执行的SQL语句拼接起是比较麻烦,如果关联的表多拼接过程是很容易出错的,下面这方法非常的好用,而且简单直观 if exists(select * from sysobjects where name=" porc_SeekProttoryProject") drop proc SeekProttoryProject go create proc SeekProttoryProject @shareSgin int, @lotteryTypeId