Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • thanks for the answer. that doesn't seem to work Commented Jan 5, 2021 at 15:12
  • Please provide sample data as text and explain why you think it doesn't work. Commented Jan 5, 2021 at 15:15
  • Please see db-fiddle.com/f/FgiQTV271HxHWMyA5nTv7/0 Commented Jan 5, 2021 at 15:18
  • am I not supposed to add the '@' before declaring a local variable? Commented Jan 5, 2021 at 17:24
  • Not in MySQL did you read the link in my comment Commented Jan 5, 2021 at 17:27