How do I achieve the same as an Oracle cursor expression does in a MySQL database (version from 5.6 onwards) below is a sample query of an Oracle cursor expression
SELECT department_name, CURSOR(SELECT salary, commission_pct
FROM employees e
WHERE e.department_id = d.department_id)
FROM departments d;
How can I achieve the same as this with a MySQL database?
if i execute this query on oracle below output i will be produced, depart_name cursor result
MCA { < SALARY=20000 , COMMISSION_PCT=2 > , < SALARY=40000,COMMISSION_PCT=20> ,}
BE {< SALARY=20000,COMMISSION_PCT=2 >,}