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

对一个表中的多个字段开展模糊查询

2012-08-10 
对一个表中的多个字段进行模糊查询select * from nrpt_book t where concat(t.name,t.author) like %平%

对一个表中的多个字段进行模糊查询

select * from nrpt_book t where concat(t.name,t.author) like '%平%';

结果是不论name字段还是author字段只要其中包含平这个字的记录 都被查出来

热点排行