Generating SQL for use with an Object
Use the following procedure to insert a statement template for the selected Table or View into the Query Window rather than dragging individual column names to build a statement that references many columns of a table.
If the Ctrl key is pressed when the menu is clicked, the SQL is inserted into the current Query tab at the cursor position. If the Ctrl key is not pressed, the SQL displays in a new Query tab if the current query has been changed since it was last saved or executed, or the SQL replaces the current query if it has not been changed since it was last saved or executed.
1 Right-click on the object and select Generate SQL.
2 Click on one of the sub menus to insert the SQL.
Table 6 provides examples of the submenus.
Menu Item |
Inserted SQL Example |
Select |
Select col1, col2, col3 From MyTable |
Insert (Values) |
Insert Into MyTable (col1, col2, col3) Values (col1 [Integer], col2 [Char(5)], col3 [BLOB]) |
Insert (Import) |
Insert Into MyTable (col1, col2, col3) Values (?, ?, ?B) |
Create |
Inserts the DDL of the object |