sql - Ignored characters in Where-Clause? -


i have following problem:

i try select below 'g-' seems ignores - , selects g , below.

select * tablea columna > 'g-' order columna  

if use > 'g-t' ignores '-' totally, giving me things 'gt...'

the sorting value of '-' lower 1 't' 'g-' lower 'gt'.

so

select * tablea columna > 'g-' order columna  

will return 'gt', but

select * tablea columna < 'g-' order columna  

won't. '-' not ignored, it's lower 't'.

of course, same goes if try using columna > 'g-t', same reasons.

if want select starts 'g-', use like:

select * tablea columna 'g-%' order columna  

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -