CREATE PROCEDURE PB_DATA(IN PRODUCT_NAME VARCHAR(50))
BEGIN
DECLARE _RODUCT_ID INT;
SELECT P_INDEX INTO _RODUCT_ID FROM TABLE_PRODUCT WHERE P_NAME=PRODUCT_NAME;
IF _RODUCT_ID IS NOT NULL THEN
SELECT * FROM TABLE_OBJECT_PRODUCT WHERE P_INDEX=_RODUCT_ID;
END IF;
END;
CALL PB_DATA('xxxx')
/*
PRODUCT_NAME 是要传进去的量吧;