This script demonstrates constants
SQL>
SQL>
SQL> SET SERVEROUTPUT ON
SQL>
SQL>
SQL> DECLARE
2 fnameValue CONSTANT VARCHAR2(50) := 'Ron';
3 BEGIN
4 fnameValue := 'AAA';
5 EXCEPTION
6 WHEN OTHERS
7 THEN
8 DBMS_OUTPUT.PUT_LINE(SQLERRM);
9 END;
10 /
fnameValue := 'AAA';
*
ERROR at line 4:
ORA-06550: line 4, column 5:
PLS-00363: expression 'FNAMEVALUE' cannot be used as an assignment target
ORA-06550: line 4, column 5:
PL/SQL: Statement ignored
SQL>
Related examples in the same category