Created
September 13, 2012 15:35
-
-
Save myleftboot/3715129 to your computer and use it in GitHub Desktop.
Standard emp to dept select
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE | |
l_row dept%ROWTYPE; | |
BEGIN | |
BEGIN | |
SELECT d.* | |
INTO l_row | |
FROM dept d | |
WHERE dname = 'Accounts'; | |
EXCEPTION | |
WHEN no_data_found THEN | |
pk_error.raise_error('department not found'); | |
END; | |
/* Do something with the value you have retrieved in l_row */ | |
END; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment