how to pass values with respective update table in mysql -
when call stored procedure passing in lists of data input: in pk varchar(max) = “11;12;13” in forenam varchar(max)= “test1;test2;test3” in surnam varchar(max) = “tst1;tst2;tst3” in bdate varchar(max) = “2016-01-02; 2016-01-04; 2016-01-03” in comm varchar(max) = “comments1;comm2;comm3” in table_nam varchar(max)= “name1” it should update table named “name1” below in 1 call sp pk forename surname bdate comments 11 test1 tst1 2016-01-02 comments1 12 test2 tst2 2016-01-04 comm2 13 test3 tst3 2016-01-03 comm3` create definer=`username`@`%` procedure `sp_ukflmm_update_multitable`( in pk int, in forenam varchar(255), in surnam varchar(255), in bdate datetime, in comm varchar(1000), in table_nam varchar(255)) begin if table_nam in ('uk_flmm_demanddata','uk_flmm_completed_demanddata') update table_nam set forename=forenam,surname=surnam,birthdate=bdate,comments=comm id=pk; else if table_nam = 'uk_flmm_sequencedata' update