Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I'm using the following query to print all title from stories table
select title from stories;
which show me all titles , The point here how to tweak it and do the following :
`order by longest title or even count longest title`
any tips
select title from stories order by char_length(title) desc
If you to order by the length of the title (longest to shortest) you should use the following query
select title from stories order by length(title) desc
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
select title from stories order by char_length(title) desc?