You can use exceptions. Try this:
DECLARE
y NUMBER;
b emp.ename%TYPE;
BEGIN
y := :enter_no;
SELECT ename INTO b
FROM emp
WHERE empno = y;
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE(b);
END;
0
solved VALUE NOT EXIST (SQL)