Posts order by field value length
Post
Cancel

order by field value length

1
2
3
4
5
--SQL or SQLITE
SELECT ADDRESS FROM CUSTOMERS ORDER BY LEN(ADDRESS) DESC

--MYSQL
SELECT ADDRESS FROM CUSTOMERS ORDER BY CHAR_LENGTH(ADDRESS) DESC

origin - https://www.pipiscrew.com/?p=19398 order-by-field-value-length

This post is licensed under CC BY 4.0 by the author.
Contents

Trending Tags