Multiple choice technology databases

Declare A char := ‘AB’; Begin A = 1; End; What is the error in the above block?

  1. There is no error in the statement

  2. Exception handler is missing

  3. CHAR is not a valid datatype

  4. Run time error The error displayed as Declare * Error at line 1: ORA-06502: PL/SQL: numeric or value error: character string too small. Will come

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Declaring A CHAR := 'AB' allocates only 1 byte (CHAR defaults to length 1). Assigning A := '1' works, but the initial declaration itself will cause ORA-06502 because 'AB' (2 bytes) exceeds the 1-byte capacity. Option D correctly identifies this runtime error.