display data alphabetically

as an example of what i am looking for, consider this data in db?

id                 ref                        custref
1000           1                            cen1000
1001           2                            n248
1002           3                            cen1001
1003           4                            cen1002
1004           5                            n249

i think you get the idea. in the db the data is an unsorted order. my question is, what would be the way to display in page so that the custref data is listed by alpha? ie, all thbe cen #s first then the d's then the e's etc. because at the moment the page isdisplaying kindof unsorted even if i use orederby asc or desc. many thanks
Who is Participating?
bernardbrinkConnect With a Mentor Commented:
select id,ref,custref from table order by custref ASC
bonjourjolieConnect With a Mentor Commented:
Select * from table order by custref ASC.
if custref's data is non english it might have a problem with exact order, but i'll order by ascii code
peter_coopAuthor Commented:
thsnk you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.