• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

sort an element in mysql

 
Ranch Hand
Posts: 181
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can we sort a word in mysql..
(if we use ORDERED BY clause we can get output as Desc/Asc order .but i need to sort the word like bcad--->abcd
 
Ranch Hand
Posts: 624
9
BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do not think MySql support this feature built in.
May be you have to create a stored function for this and write your own logic to sort.
 
chamini prashakthi
Ranch Hand
Posts: 181
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yeh I think so...
I searched a lot.
but couldn't find anything related...
 
Rancher
Posts: 4801
50
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is it you are trying to do?

I can't think of any obvious situation where you would want to change the data in a column like that.
 
Marshal
Posts: 8856
637
Mac OS X VI Editor BSD Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

chamini prashakthi wrote:How can we sort a word in mysql..
(if we use ORDERED BY clause we can get output as Desc/Asc order .but i need to sort the word like bcad--->abcd

Sounds like a modifying of a record. Is it something permanently needs to be done?

Can't records be inserted into db already sorted in the way you want? Can't they be sorted once they are pulled out from db?

Just trying to pull more of a story out of you, same as Dave.
 
Thank you my well lotioned goddess! Here, have my favorite tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic