Link to home
Create AccountLog 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
Create an account to see this answer
Signing up is free. No credit card required.
Create Account