Query Builder allows generating scripts from the results grid based on the selected table data with the following statements: INSERT, WHERE IN(), WHERE AND OR, and UPDATE.
1. In the results grid, select the data for which you want to generate a script. There are two ways to do it:
Move the mouse pointer across the grid holding the left mouse button.
Click the first cell of the required data range, press the SHIFT key, hold it and click the last cell. A rectangular range of cells will be selected. Using the CTRL key, you can include/exclude cells from selection.
Alternatively, you can select any required cells by clicking them while holding CTRL, and then invoke Generate Script As. The output will include data from all rows and columns that are represented in the selection.
2. Open the shortcut menu and go to Generate Script As, then select the required statement type, and then choose whether the output should be opened in a new window, copied to clipboard, or saved to a file.
Let’s see how it’s done. First we select the required data.
Now we are ready to generate Script As from the results grid.
This is how it works for the INSERT statement:
This is how it works for the WHERE IN() statement:
It is convenient to specify the required condition by inserting the copied WHERE statement into a previously created SELECT * FROM query.
This is how it works for the WHERE AND OR statement:
It is convenient to specify the required condition by inserting the copied WHERE statement into a previously created SELECT * FROM query.
This is how it works for the UPDATE statement: