文斌的博客

学无止境
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年6月1日

摘要: 1,通过参数化来执行一个模糊查询数据库中声明一个变量declare @a varchar(10) set @a=1select * from student where ID like '%' + @a +'%'在c#中使用StringBuilder strSql=new StringBuilder(); strSql.Append("select * from student"); strSql.Append(" where B_name like '%' + @B_name +'%'") 阅读全文

posted @ 2012-06-01 10:21 文斌1988 阅读(183) 评论(1) 推荐(0) 编辑