If you are a PL/SQL beginner or want to start learning, then keep your close attention in this tutorial as we are going to share how to write a PL/SQL block to differentiate between CHAR and VARCHAR2 datatype.
Copy the below PL/SQL program and execute it. In this program, we are going to share a PL/SQL.
1 2 3 4 5 6 7 8 9 10 11 12 | 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; / |
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.