Creating a SQL File

You can manually create a SQL file.

You can use an existing project to store the SQL file or create a project when you create the SQL file.

  1. In the Database Development perspective, select File > New > Other, expand SQL Development, select SQL File, and click Next.

    The New SQL File wizard opens.

  2. Do one of the following:
    • To use an existing project, in the Enter or Select the Parent Folder field, enter or select the project name.
    • To create a new project, click Create Project and follow the wizard instructions.
  3. Type the SQL file name in the field above the Advanced button.
  4. (Optional) Click Advanced to link to a file in the file system and to create, edit, or remove defined path variables.
  5. Select a connection profile type from the Connection profile type drop-down list.
  6. To associate the SQL file with a connection profile, select from the Connection profile name drop-down list.
    Note: If the a connection profile does not appear, click Create to create a new connection profile.
  7. Narrow your database selection in the Database Name field.
  8. (Optional) Select the Do not connect now check box if you do not want to connect to the server.

    You cannot use the complete content assist feature if this check box is selected.

  9. Click Finish.

    A SQL file is created under the project in the Navigator. The cursor moves to either the empty SQL file in the editor or to the beginning of the file if you linked it to an existing file.

  10. Right-click in the SQL Editor and select Visual SQL to enter SQL statements.
  11. Use Content Assist to edit the SQL statement.
  12. Right-click in the SQL Editor and select Save File.
Related concepts
SQL Files
SQL Editor
Content Assist
Related tasks
Opening a SQL File
Editing a SQL File
Saving a SQL File
Executing a SQL File