diff --git a/sqlTranslate/.idea/workspace.xml b/sqlTranslate/.idea/workspace.xml index 424a9e5c8..93b3d6fa7 100644 --- a/sqlTranslate/.idea/workspace.xml +++ b/sqlTranslate/.idea/workspace.xml @@ -5,11 +5,7 @@ - - - - - + diff --git a/sqlTranslate/src/main/java/Document/PL in Oracle b/sqlTranslate/src/main/java/Document/PL in Oracle new file mode 100644 index 000000000..a30a64d1c --- /dev/null +++ b/sqlTranslate/src/main/java/Document/PL in Oracle @@ -0,0 +1,17 @@ +DECLARE + v_var1 v_type; + ... +BEGIN + -- PL/SQL +END; + +Example: DECLARE + v_name Varchar2(20); + v_salary employees.salary%TYPE; + BEGIN + SELECT name, salary INTO v_name, v_salary FROM employees WHERE employee_id = 100; + DBMS_OUTPUT.PUT_LINE('Name: ' || v_name || ', Salary: ' || v_salary); + EXCEPTION + WHEN NO_DATA_FOUND THEN + DBMS_OUTPUT.PUT_LINE('No data found.'); + END; \ No newline at end of file