Execute statement by shortcut in mysql workbench

前端 未结 6 1426
情话喂你
情话喂你 2021-01-31 14:20

How can I execute any statement in MySQL Workbench using shortcut? Now I have to press buttom (yellow lightning). Of course I have read this: http://dev.mysql.com/doc/workbench/

6条回答
  •  余生分开走
    2021-01-31 15:18

    MySQL Workbench 6.3


    Default key mapping

    • Execute (All or Selection) -> Ctrl+Shift+Enter
    • Execute Current Statement -> Ctrl+Enter


    Change the default mapping

    Open:

    C:\Program Files\MySQL\MySQL Workbench 6.3 CE\data\main_menu.xml

    If you search for Execute (All or Selection) and for Execute Current Statement, you'll also identify (based on what you see in the screenshot above) the meaning of Modifier and Return:

    • Modifier = Ctrl
    • Return = Enter

    Here you can change the default mappings. Being familiar with other tools like SQuirreL SQL and pgAdmin, I always prefer to run only the selected query using Ctrl+Enter or F5, so I change the following in the main_menu.xml:

    1. To run the selected query using Ctrl+Enter:
         
          com.mysql.wb.menu.query 
          Execute (All or Selection) 
          query.execute 
          builtin:query.execute 
          action 
          Modifier+Return
         
        ...
         
          com.mysql.wb.menu.query 
          Execute Current Statement 
          query.execute_current_statement 
          builtin:query.execute_current_statement 
          action 
          Modifier+Shift+Return
          windows
         
    
    1. Run the selected query using F5:
         
          com.mysql.wb.menu.query 
          Execute (All or Selection) 
          query.execute 
          builtin:query.execute 
          action 
          F5
         
    

    Save the file and restart MySQL Workbench to see the changes.

提交回复
热议问题