Databases :: MySql :: mysql order by length of column |
|||
| By: Bernard |
Date: 15/06/2007 15:03:01 |
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 | 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 |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








