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

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

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

猜你喜欢

转载自lijinfengjava.iteye.com/blog/1471582