对一个表中的多个字段进行模糊查询
select * from nrpt_book t where concat(t.name,t.author) like '%平%';
结果是不论name字段还是author字段只要其中包含平这个字的记录 都被查出来
发布时间: 2012-08-10 12:19:33 作者: rapoo
对一个表中的多个字段进行模糊查询
select * from nrpt_book t where concat(t.name,t.author) like '%平%';
结果是不论name字段还是author字段只要其中包含平这个字的记录 都被查出来