# Editing a SQL File

You can edit a SQL file using Content Assist.

1. Right-click the SQL file that you want to edit in the Navigator and select Open.

   The SQL file displays in the SQL Editor and a connection state, connected or not connected, is displayed in the status bar at the bottom left edge of the Workbench.

2. If the SQL file is not connected to a database, right-click the file and select Attach Connection Profile.

   This enables you to use the full capabilities of content assist and to execute the SQL file or selected statements.

3. Edit the SQL file using content assist or enter edits manually.
4. (Optional) To remove edits since your last save, select File > Revert.
5. Save the file to its project.

Related concepts
SQL Files
SQL Editor
Content Assist
Database Development Perspective
Related tasks
Creating a SQL File
Opening a SQL File
Saving a SQL File
Executing a SQL File
Related reference
SQL Editor Preferences