我有一个姓氏和名字的人表。
考虑以下记录,其中
FirstName == 'Pete' 和 LastName == 'Aaaa'
当我运行以下选择语句时:
select * from Person where FirstName='Pete' and LastName like 'a%' -- 0 record returned
select * from Person where FirstName='Pete' and LastName like 'aa%' -- 1 record returned
select * from Person where FirstName='Pete' and LastName like 'aaa%' -- 0 record returned
select * from Person where FirstName='Pete' and LastName like 'aaaa%' -- 1 record returned
当我在 SQL Fiddle 中运行它时 - 为每个选择返回 1 条记录,因为它应该SQL Fiddle 查询
有人有什么想法吗?