0

I'm getting the values in my stored procedure as below in mysql.

(task_id,equipment_name,equipment_hours) 12,'jcb,tractor,bike','10,12,15'

Here i need to split the comma separated values and need to insert them in the table as below in my stored procedure (Please note that the number of values is not fixed).

ID  Equipment_name  Equipment_hours
12  jcb              10
12  tractor          12
12  bike             15

How i can achieve this in mysql stored procedure.

2
  • Research mysql split string, Commented May 24, 2022 at 13:50
  • I linked to a duplicate question about doing this in a stored procedure, but FWIW I would not use a stored procedure. This task will be easier in any other programming language. Commented May 24, 2022 at 16:38

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.