Q:

Write a PL/SQL block to differenciate between CHAR and VARCHAR2 datatype

0

Write a PL/SQL block to differenciate between CHAR and VARCHAR2 datatype.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

SET SERVEROUTPUT ON;
DECLARE
  f_name  CHAR(15 CHAR);
  l_name   VARCHAR2(15 CHAR);
BEGIN
  f_name := 'Allen  ';
  l_name  := 'Munra  ';
 
  DBMS_OUTPUT.PUT_LINE('*' || f_name || '*');
  DBMS_OUTPUT.PUT_LINE('*' || l_name || '*');
END;
/

Sample Output:

*Allen          *
*Munra  *

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now