ORACLE SQL ORDER BY -


how go ordering last 3 letters of name?

for example:

ashley

julia

belvet

ley > lia > vet

also, how go doing secondary sort id if last 3 letters same (bobby, robby...)?

for first question:

order substr(name, -3) 

for second question:

order substr(name, -3), id 

Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -