Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Declaring bind variables using decimals

970021Sep 16 2013 — edited Sep 16 2013

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); 

commit; 

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.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 14 2013
Added on Sep 16 2013
3 comments
402 views