Avatar of brgdotnet
brgdotnet
Flag 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;
Oracle Database

Avatar of undefined
Last Comment
Helena Marková

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Helena Marková

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck