Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse Data Tools Platform Guide
Previous Page Home Next Page

Creating an INSERT Statement From a Subquery

Use SQL Query Builder to create an INSERT statement from a subquery.


Connect to the data source through a connection profile.

Note: Some syntactic variations might exist between your database and the SQL syntax that SQL Query Builder supports; consequently, some SQL Query Builder features might not work with your database.
  1. Open a new or an existing SQL file, and be sure to select the connection profile Type, Name, and Database.
  2. In an appropriate place in the editor window, right-click and select Edit in SQL Query Builder.
  3. In the Outline pane, right-click SELECT Statement and select Change Statement Type.
  4. Select INSERT and click OK.
  5. Select the table by right-clicking in the Tables pane and selecting Add Table.
  6. Specify the columns to use in the statement.
    Option Description
    Specify all columns Right-click the table in the Tables pane, and select Select All Columns.
    Specify specific columns Use either method:
    • In the Tables pane, select the check box next to the column name.
    • In the Columns tab, select the specific column from the drop-down menu.
  7. Select Subquery.
  8. From the Query name list, select Add SELECT Statement or Add FULLSELECT Statement.
  9. Complete the SELECT or FULLSELECT statement.

    You can nest a FULLSELECT statement under a SELECT statement.

  10. (Optional) To run the SQL code, in the SQL Source pane, right-click and select Run SQL.

    View the results in the SQL Results tab.

  11. Click OK to exit SQL Query Builder and to return to the SQL File Editor, where the SQL code displays in the editor window.

    Clicking Cancel results in no changes to the SQL code in the SQL File Editor. You lose any changes you made in SQL Query Builder.

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire