brgdotnet
asked on
variable declaration for Oracle in sql developer
Suppose I am in Sql developer and open a new window to perform a sql query. How should I declare a variable? My first line of code below is causing the issue and I don't know why? All I need is to declare a variable on the fly, and then use it. Apparently the Declare statement is not liked by the compiler.
DECLARE MY_NUMBER(10);
SELECT COUNT(1) FROM THE_TABLE;
DECLARE MY_NUMBER(10);
SELECT COUNT(1) FROM THE_TABLE;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.