title: MySql, split a string and insert into table
body: <p>I have two inputs for my stored procedure. One is the 'RoledID' and second one is the 'MenuIDs'. 'MenusIDs' is a list of comma separated menus ids that need to be inserted with RoledID. RoleId is just an INT and we need to put this RoledID against each MenuID. My table 'RolesMenus' contains two columns one for MenuID and one for RoleID. </p>
  
  <p>Now I need to split MenuIDs and insert each MenuID with RoleID. </p>
  
  <p>How can I write a stored procedure for it?</p>