简体   繁体   中英

Oracle SQL Developer: can bind variables begin with upper case letter?

I'm using Oracle SQL Developer to test a query to be used in an ADF application's read only view object. ADF documentation recommends using an uppercase letter to begin the name of a bind variable. So... I've creatively named mine :BindVariable

Funky part is SQL Developer appears to dislike bind variables that begin with an upper case letter.

This query works

select * from tablename
where id like :bindVariable

This one does not

select * from tablename
where id like :BindVariable

Am I correct in understanding that bind variable names cannot begin with an upper case letter? Or is there something else amiss here?

EDIT

Is this just an Oracle SQL Developer thing? :BindVariable works just fine in JDeveloper's database navigator.

Thanks for reading! Any input will be greatly appreciated.

Oracle SQL Developer: can bind variables begin with upper case letter?

Yes.

There is no issue with SQL Developer . I have tested it on version 3.2.20.10

Please see the screenshots:

Query:

在此输入图像描述

Result:

在此输入图像描述

No issues in SQL*Plus either:

SQL> variable BindVariable VARCHAR2(20)
SQL> EXEC :BindVariable := 'SMITH'

PL/SQL procedure successfully completed.

SQL> SELECT empno FROM emp WHERE ename LIKE :BindVariable;

     EMPNO
----------
      7369

SQL>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM