Anonymous Block with Variable and SELECT
metalrayOct 27 2010 — edited Oct 27 2010Hi Guys,
I am struggling to connect the material I am learning. I read about anonymous blocks and variables so I want to write a
nice and neat select with all the fancy stuff (variables, exceptions) to get it right and to it as I read in the book.
DECLARE
MYSTRING VARCHAR(10);
MYSTIRNG := 'X';
BEGIN
SELECT * FROM DUAL WHERE DUMMY = MYSTRING
END;
but....this causes one error after the other. Am I getting the concept wrong here or is it a syntax error?