visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Databases :: MySql :: mysql order by length of column


By: Bernard France  Date: 15/06/2007 15:03:01  English  Points: 20 Status: Answered
Quality : Excellent
is it possible to order by length of column using MySql ?
By: VGR Date: 15/06/2007 15:16:19 English  Type : Answer
well, it's ambiguous :

1) if you mean "by the length af actual data contained", then your friend is the function char_length()

2) if you meant "by the column's definition length", then you've to first query for a "describe tablename;", then read all rows [=column definitions] to get the order, then query the data in that order.

It's not that difficult IMHO

Do register to be able to answer

EContact
browser fav
page generated in 289.358850 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page