Creating a SQL File

Use Database Development tools to create SQL files.

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 > SQL File .

    You can also click Open SQL Scrapbook button Open Scrapbook to Edit SQL Statements to quickly create SQL statements in SQL Scrapbook.

  2. Associate the SQL file with a project.
    To Do this
    Use an existing project Enter or select the project in the Enter or Select the Parent Folder.
    Create a new project Click Create Project, and follow the wizard instructions.
  3. Enter the File Name.
  4. (Optional) Click Advanced to link to a file in the file system and to create, edit, or remove defined path variables.
  5. (Optional) Associate the SQL file with a connection profile.
    1. Select a Connection Profile Type.
    2. Select a Connection Profile Name, or click Create to create one.
    3. Select the Database Name.
  6. (Optional) Select Do Not Connect Now to remain disconnected from the server.

    You cannot use the complete Content Assist feature if you select this option.

  7. Click Finish.

    A SQL file is created under the project in WorkSpace Navigator and opens in the SQL File Editor.

  8. Right-click in the SQL File Editor and select Visual SQL Edit in SQL Query Builder to graphically build SQL statements, or type your SQL directly in the editor window.
  9. (Optional) To add or remove comment delimiters for a line of code, right-click one or more lines of code, and select Toggle Comment.
  10. When finished, save the SQL file.
Related concepts
SQL File Editor
SQL Scrapbook
Related tasks
Editing a SQL File
Opening a SQL File
Saving a SQL File
Executing a SQL File
Related reference
SQL Editor Preferences
Code Assist Preferences
SQL Files/Scrapbooks Preferences
Syntax Coloring Preferences
Templates Preferences