当前位置: 代码迷 >> ASP.NET >> 相像查询
  详细解决方案

相像查询

热度:9836   发布时间:2013-02-25 00:00:00.0
相似查询
表A的结构如下:
name
相似查询
相似的字
相似的语句
查询相似
其他的东西

如果写一个"想找相似",把表A中所有"相似"的都查询出来.应该怎么写?



------解决方案--------------------------------------------------------
select name from 表 where name like %相似%
------解决方案--------------------------------------------------------
探讨
select name from 表 where name like %相似%

------解决方案--------------------------------------------------------
将查询字段用字符串处理下,“想找”这种应该是智能关键字吧
select name from A where name like '%相似%'
------解决方案--------------------------------------------------------
select * from A where name like '%" + TextBox1.Text + "%'

这个就是搜索TextBox中的值了
  相关解决方案