4.5.3 Values Bind as Strings
Bind variables in your SQL and PL/SQL are always treated as strings, except
when using database 26ai and explicitly setting a page item's data type to
BOOLEAN.
Even when you configure a page item like P5_START_DATE as a Date Picker or define a P5_MAX_QUANTITY item as
a Number Field, APEX binds your references to :P5_START_DATE and
:P5_MAX_QUANTITY as VARCHAR2 string values. There
are two exceptions to this rule. You can optionally configure the data type to be:
CLOBfor Hidden, Text Area, and Rich Text Editor page itemsBOOLEANfor Switch and Checkbox page items.
- Working with Data Values as Numbers
If a page item contains a numeric value, using its value as aVARCHAR2-typed bind variable is fine when the database performs automatic type conversion. - Working with Data Values as Dates
If a page item contains a date value, then using its value as aVARCHAR2-typed bind variable can raise an error if the page item uses a different format mask than the application default. - Working with Delimited Values
When a page item contains multiple value separated by a delimiter like colon (:) or comma (,) you can use its multiple values in SQL or PL/SQL.
Parent topic: Using Data Values in SQL and PL/SQL