Reputation: 5757
How can you return the line of a paragraph from a LONGTEXT column, if you know what the line of text starts with?
SELECT
SUBSTRING('\nA line of text starts here', `paragraphs`)
FROM books
Upvotes: 1
Views: 660
Reputation: 317
By using "LIKE". % indicates that more characters can follow.
SELECT paragraphs FROM books WHERE paragraphs LIKE '\nA line of text starts here%'
Upvotes: 2