Editing PL/SQL in your Database

  • View Database Explorer by clicking the database icon in the Activity Bar on the far left side of Visual Studio Code.

  • If the Database Explorer pane is empty (no connection nodes showing), click the plus (+) sign to create a new connection, following the steps in Connecting to Oracle Database or Connecting to Oracle Autonomous Database (ADB). Once connection nodes display, you can click on the node to view the database schema.

  • Navigate in the tree control to the PL/SQL package, stored procedure/function, or trigger you want to edit.

  • Right click on the PL/SQL package, stored procedure/function, or trigger and select Open/Open Package Body/Open Specification to open PL/SQL for editing. (Note: this menu item was previously named Edit/Edit Package Body/Edit Specification in earlier releases.)

  • When done editing, right click in the PL/SQL code and select Save. (Note: this menu item was previously named Save to Database in earlier releases.)

  • Errors that occur when saving will be listed in the Problems Panel. Click on an error to go to the line that contains the error.

  • If you are using Visual Studio Code Auto Save, we recommend that you follow the steps in Saving PL/SQL in Database to a File. You can use Download instead of Open, or adjust the VS Code Auto Save Delay setting.