SET VERIFY OFF
SET SERVEROUTPUT ON
DECLARE
v_char CHAR(1) := '&user_input';
BEGIN
IF ( v_char >= 'A' AND v_char <= 'Z') OR ( v_char >= 'a' AND v_char <= 'z') THEN
DBMS_OUTPUT.PUT_LINE('User input is a letter');
ELSIF ( v_char >= '0' and v_char <= '9' ) THEN
DBMS_OUTPUT.PUT_LINE('User input is a number');
ELSE
DBMS_OUTPUT.PUT_LINE('User input is a special Character');
END IF;
END;
/
Enter value for user_input: A
User input is a letter
PL/SQL procedure successfully completed.
SQL> /
Enter value for user_input: 3
User input is a number
PL/SQL procedure successfully completed.
SQL> /
Enter value for user_input: $
User input is a special Character
PL/SQL procedure successfully completed.
Subscribe to:
Post Comments (Atom)
External Table
Oracle External Table External tables are defined as tables that do not resides in the database allows you to access data that is stor...
-
Table clustering is an optional technique of storing data. In table clustering, rows from one or more tables those are associated with ea...
-
Oracle PL/SQL block accepts user input information with the help of substitution variable. Substitute variable can not be used to output va...
-
Finally continue statement added to oracle 11g PL/SQL language. It signals an immediate end to a loop iteration and return to first statemen...
No comments:
Post a Comment