Link to home
Start Free TrialLog in
Avatar of brgdotnet
brgdotnetFlag for United States of America

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;
ASKER CERTIFIED SOLUTION
Avatar of Helena Marková
Helena Marková
Flag of Slovakia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial