Hi,
Help me out in writing a query to count the character ‘<p>’ in the text_val coumn in the table “articles”. And select the rows if count of ‘<p>’ is only 2.
Hi,
Help me out in writing a query to count the character ‘<p>’ in the text_val coumn in the table “articles”. And select the rows if count of ‘<p>’ is only 2.
SELECT *
FROM articles
WHERE LENGTH(text_val) -
LENGTH(REPLACE(text_val,'<p>',''))
= 6