looping and inserting values into a table in mysql

前端 未结 1 1563
名媛妹妹
名媛妹妹 2021-01-26 12:35

Hi I have two arrays as input. I want to insert into a table using loop. This is what I have tried.

simple_loop:LOOP

SET i = i + 1;
     simples_loop:LOOP
              


        
相关标签:
1条回答
  • 2021-01-26 12:56

    Try something like this:

    INSERT INTO ROLE_PRIVILEGE_BRIDGE (ROLE_ID,PRIVILEGE_ID,VALUE) 
        (SELECT V_ROLE_FK, p_privilege_fk, p_privilege_fk FROM firstTable) 
    
    0 讨论(0)
提交回复
热议问题