I am getting an error:
1052 - Column 'orderId' in where clause is ambiguous
when trying to do CALL GetOrderById(2000)
BEGIN
SELECT
hsorders.*,
hslineitem.partNum, hslineitem.price
FROM
hsorders
JOIN hslineitem ON hslineitem.orderId = hsorders.orderId
WHERE
orderId = orderId;
END
I need to pass an Id
and join data from two tables that have the same `orderId``.
What am I doing wrong?