Is Multibyte Name Supported For Placeholder(Bind Variable) In SQL*Plus? (Doc ID 1339845.1)

Last updated on AUGUST 08, 2011

Applies to:

SQL*Plus - Version: 11.1.0.7 and later   [Release: 11.1 and later ]
Oracle Server - Enterprise Edition - Version: 11.1.0.7 and later    [Release: 11.1 and later]
Information in this document applies to any platform.

Goal

Can mulitibyte characters be used in placeholder(Bind Variable) name in SQL*Plus? Can you use the name of the placeholder as a multibyte string containing non-English multibyte characters?

For Example:

variable MULTIBYTE_NAME number
begin
select salary into :MULTIBYTE_NAME from employees where salary>20000;
end;
/



According to the following OCI manual, there is a description about placeholder name restrictions.

http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28395/oci04sql.htm#i420655
Oracle® Call Interface Programmer's Guide 11g Release 1 (11.1)
Part Number B28395-06
4 Using SQL Statements in OCI
Binding Placeholders in OCI
Rules for Placeholders
-----------------------------------------
The rules for forming placeholders are:

  • The first character is a colon (":").
  • This is followed by a combination of underscore ("_"), A-Z, a-z, or 0-9.
    However, the first character following the colon cannot be an underscore.
  • The letters must be only from the English alphabet and only the first 30 charac ters after the colon are significant. The name is case-insensitive.
  • The placeholder can consist of only digits after the colon. If only digits, it must be less than 65536. If the name starts with a digit, then only digits are allowed.
  • The hyphen ("-") is not allowed.

-----------------------------------------

Can this description be applied to SQL*Plus placeholder(Bind Variable)?

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms