首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

怎样给SQL语句中加入变量.该怎么处理

2012-01-15 
怎样给SQL语句中加入变量.急急急!变量:stringstrthis.textbox.textstringstrSelectselect*fromtablewh

怎样给SQL语句中加入变量.急急急!
变量:string   str   =   this.textbox.text;
string   strSelect   =   "select   *   from   table   where   name   like   ??? "

怎样把变量str     加入到???处         谢谢!!

[解决办法]
string str = this.textbox.text;
string strSelect = "select * from table where name like ' ' "+str+ " ' ' ";
[解决办法]
string strSelect = "select * from table where name like ' '+str+ '% ' ";

热点排行