want to Write a Stored Procedure in MYSQL

18 views Asked by At

i have 3 tables e.g A, B, C want to select from A then Update B and Insert into C i hv written SP like This.

DELIMITER //
CREATE PROCEDURE ABC( IN id int )
BEGIN       
        SELECT * FROM A WHERE FIND_IN_SET(LEFT(A.id,10),id);
        UPDATE B
        SET e.g=e.g     WHERE e.g
        INSERT INTO B (....) SELECT .,.,.,.  
        FROM         ; 
END //

The problem is i hav variable amount of id's to pass on this Sp, can be min1 and max (maybe 1000+) The Qs is how to pass Variable id's in Sp.??? need help.

0

There are 0 answers