1 Reply Latest reply on May 27, 2015 4:42 PM by Gary Graham-Oracle

    How to use Number as a variable?

    stueckl

      Hi,

       

      I'm using SQL Developer 4.1.0.19.07 ... and whenever i use something like ...

      variable myVar Number;
      execute :myVar := 10;
      

       

      A query like ...

      select :myVar "myVar" from dual;
      

       

      Gives me the result ...

      myVar
      -----
            -- that is "null", as I don't have a null replacement ;-)
      

       

      What I'm doing wrong? Any advice (besides using VarChar2)?

       

      Thanks in advance

      Peter