我有一个客户,有2列名和姓(SQL Server 2008)。用户希望按姓名搜索 - 或者只需输入Jo Bloggs。假设一列装满SQL Server 2008中的LIKE函数需要建议
CustomerId Name Surname
1 Jo Bloggs
做
select * from customer where Name like '%Jo%' will find the records
select * from customer where Surname like '%Bloggs%' will find the records
但我怎样才能使它返回记录,如果用户类型都名和姓乔如布洛斯?
谢谢大家的答复。不止一个答案会工作,但我不得不选择一个。 谢谢 – user9969 2010-07-21 13:30:11