Automating - Inserting COLUMNS and Value Stubs with the Automate menu vastly reduces the amount of typing needed for more complex INSERT statements.
Below is an example of introducing an INSERT statement with Columns and Stubbed Values.
1. Connect to the Server | 2. Automate Insert Statement | 3. Select Table | 4. Move the Cursor | 5. Automate Introduce Columns |
6. Column Names without typing | 7. Move the Cursor | 8. Introduce Stubbed Values | 9. Value Stubs without typing |
The SQL Automation features in Aqua Data Studio (the "Automate" pull-down menu) is to cut down on the number of keystrokes you make while writing SQL statements. Here is an example of how to automate the writing of basic INSERT statements with COLUMNS and value stubs.
Automate INSERT COLUMNS
Press CTRL+ALT+I
a. Introduce an INSERT template,INSERT INTO () VALUES()
b. Place the cursor at theINSERT INTO ^() VALUES()
location
c. Popup a list of tables for auto-completion of the table name you want to INSERT data intoType out the table you want and move the cursor to the column location,
INSERT INTO MYTABLE(^) VALUES()
Press CTRL+ALT+C
a. Introduce all of the columns for the TABLE you have typed in a comma-separated list in the order of definition
Automate INSERT Value Stubs
- Press CTRL+ALT+I
a. Introduce an INSERT template,INSERT INTO () VALUES()
b. Place the cursor at theINSERT INTO ^() VALUES()
location
c. Popup a list of tables for auto-completion of the table name you want to INSERT data into - Type out the table you want and move the cursor to the column location,
INSERT INTO MYTABLE(^) VALUES()
- Press CTRL+ALT+C
a. Introduce all of the columns for the TABLE you have typed in a comma-separated list in the order of definition - Move the cursor to the values definition location
INSERT INTO MYTABLE(COLUMN1, COLUMN2, ...) VALUES(^)
- Press CTRL+ALT+V
a. Introduce stubbed values for the columns of the table according to data type - At this point you have
INSERT INTO MYTABLE(COLUMN1, COLUMN2, ...) VALUES(’’, 0, ...)
- You can now finish your statement