可能是这样的。
;with T(Title) as
(
select 'The Ancient Alligator' union all
select 'Aunt Annie''s Alligator' union all
select 'A Complete Guide to Alligators' union all
select 'Countrified Alligators' union all
select 'Don''t Touch the Alligator!' union all
select 'An Effortless Alligator Hunt'
)
select Title
from T
order by replace(
replace(
replace(T.Title,
'A ', ''),
'An ', ''),
'The ', '')
结果:
Title
------------------------------
The Ancient Alligator
Aunt Annie's Alligator
A Complete Guide to Alligators
Countrified Alligators
Don't Touch the Alligator!
An Effortless Alligator Hunt