3 Replies Latest reply: Sep 16, 2013 12:23 PM by rp0428 RSS

    Declaring bind variables using decimals


      I'm on Oracle 11.2


      In SQL Developer, I'm having hard time executing a SQL with a bind variable. Below is the test table.


      create table TEST1 (TYP varchar2(3), NUM number(30,18));  
      insert into TEST1 values ('TTT', 45.15168794137111);  


      Then I execute the below query and it returns no results. Why?

      VARIABLE P1 number;  
      EXEC :P1 := 45.15168794137111;  
      select * from TEST1 where NUM = :P1;  


      The above works in SQL Plus.