Split a Delimited String into Rows
The Tags table stores comma-separated tags per post. Return one row per (post_id, tag), ordered by post_id then tag. (Use a recursive CTE.)
Table schema
Posts(post_id INT PRIMARY KEY, tags VARCHAR(30))Sample data
post_id | tags
1 | sql,db
2 | api
3 | ds,algo,sql
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.