Select the first 50 words of an article
I am cleaning up my code snippets and i found the following little trick in one of them that i have removed. Assuming that different words are separated by spaces we can use SUBSTRING_INDEX as following
SELECT SUBSTRING_INDEX(body,' ',50) AS dn FROM mytable