Sidebar

Mobile navigation sidebar

Features

Snippets

Use and customise PL/SQL code snippets to accelerate database code authoring.

Snippets

Nexo SQL Studio ships with PL/SQL and SQL snippets that save you from boilerplate. Snippets are triggered by a short prefix keyword and expanded by pressing Tab.

Using Snippets

Type the snippet prefix in any .sql, .pls, .pkb, .pks, .prc, or .fnc file and press Tab (or select from the completion list with Ctrl+Space).

Example — Create a procedure:

Type proc and press Tab:

CREATE OR REPLACE PROCEDURE procedure_name (
    p_param1 IN VARCHAR2
) AS
BEGIN
    -- TODO
    NULL;
END procedure_name;
/

Example — Exception block:

Type excep:

EXCEPTION
    WHEN OTHERS THEN
        ROLLBACK;
        DBMS_OUTPUT.PUT_LINE('Error: ' || SQLERRM);
        RAISE;

Built-in Snippet Library

PrefixExpands to
procCREATE OR REPLACE PROCEDURE …
funcCREATE OR REPLACE FUNCTION …
pkgPackage spec skeleton
pkgbPackage body skeleton
triggerCREATE OR REPLACE TRIGGER …
cursorCursor declaration + loop
beginBEGIN … EXCEPTION … END;
ifIF … THEN … END IF;
loopLOOP … EXIT WHEN … END LOOP;
forloopFOR i IN … LOOP … END LOOP;
pldocPL/SQL documentation block
excepException handler block
bulkBULK COLLECT INTO … FORALL …
dynEXECUTE IMMEDIATE …

Snippets View

Use the Snippets / Reports view to create folders, create snippets, filter entries, edit associated connections, and insert snippets into the active editor.

Documentation Snippets (pldoc)

The pldoc snippet inserts a structured documentation block above a procedure or function:

/**
 * <Short description>
 *
 * @param p_param1  Description of parameter
 * @return          Description of return value
 */

You can customise the pldoc template by referencing a folder that contains your own pldoc.json file:

// settings.json
"nexo-sql-studio.pldoc.path": ".vscode"