日期:2014-05-18  浏览次数:20353 次

求多个关键字模糊查询
求多个关键字模糊查询
 想写一个存储过程来多关键字模糊查询
例如:广州亚洲大酒店
select * from hotel where hotelname like'%广州大酒店%' 查不出来
select * from hotel where hotelname like'%广州%大酒店%' 这样就可以查出来
 
请教一下 该怎样写存储过程好
要分割字符 那怎样分割?

------解决方案--------------------
SQL code
select * from hotel where hotelname like '%广州%' or hotelnamelike '%大酒店%'