+------+ | code | +------+ | A10 | | A20 | | A5 | | A6 | | A7 | | A8 | | A9 | +------+
You can query like this:
mysql> select * from table order by length(code), code;
+------+ | code | +------+ | A5 | | A6 | | A7 | | A8 | | A9 | | A10 | | A20 | +------+
Cheers!
Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog. Keep update your blog.
ReplyDeleteHire PHP Mysql Developer in India