Write a PL/SQL block to learn how to declare a character type variable.
PL/SQL Code:
DECLARE c VARCHAR2(8 CHAR); BEGIN c := 'abc '; END; /
if you declare like this and used to insert too long data, see an error message will appear.
DECLARE c VARCHAR2(3); BEGIN c := 'abc '; END; /
Sample Output:
DECLARE * ERROR at line 1: ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 4
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
PL/SQL Code:
if you declare like this and used to insert too long data, see an error message will appear.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer