Oracle PL/SQL

Style guide

Assignment operator is :=, test for equality with = operator.

Strings must be single-quoted, apparently.

dbms_output.PUT_LINE('print data to console: ' || l_data);

Anonymous Blocks

DECLARE
    -- declare variables and optionally assign to literals
    l_num_users := 42;
BEGIN
    -- execute statements
    l_num_users := l_num_users + 1;
    dbms_output.PUT_LINE('There are ' || l_num_users || ' users.');
EXCEPTION
    -- optionally handle exceptions
    WHEN OTHERS THEN
        dbms_output.PUT_LINE('Exception thrown!');
END;

results matching ""

    No results matching ""