Defining an INSERT statement
You can create an INSERT statement to insert a new row of data into a database.
In this example, you will use the SQL Editor to create the following INSERT statement:
INSERT INTO STAFF (NAME, COMM, DEPT, ID, JOB, SALARY, YEARS)
VALUES (:NAME, :COMM, :DEPT, :ID, :JOB, :SALARY, :YEARS)
 
INSERT Query 
1. Select Create > INSERT from the Query menu on the SQL Statement - Settings window.
The INSERT Details window is displayed. It looks like this:
INSERT Details window
2. Select the STAFF table from the Table/view drop-down list. The columns belonging to that table are displayed in the Columns list. Because you can only work with one table at a time, these columns are unqualified.
Setting column values  
1. Select Select all from the pop-up menu on the Columns list.
Any columns that are not selected and included in the INSERT statement will have a value of NULL inserted by default.
When you select a column, it is displayed in the INSERT columns list and given a default value displayed in the Column value text field. The default value is a host variable with the same name as the column and can be changed by typing in the text field or by using the Column value menu.
The type of data the column can hold is also displayed for you under the Column value text field.
In this sample statement, a new row of staff data is inserted based on variable values passed to the statement through host variables. If you want, name and save your INSERT statement.
 
Last modified date: 06/01/2018