2.306 PLSQL_IMPLICIT_CONVERSION_BOOL

PLSQL_IMPLICIT_CONVERSION_BOOL allows or disallows implicit conversions in PL/SQL between numeric data types and the BOOLEAN data type, and between character data types and the BOOLEAN data type.

Property Description

Parameter type

Boolean

Default value

false

Modifiable

ALTER SESSION, ALTER SYSTEM

Modifiable in a PDB

Yes

Range of values

true | false

Basic

No

Oracle RAC

Multiple instances must have the same value.

When this parameter is set to true, PL/SQL supports the following implicit data type conversions:

  • Numeric data type to BOOLEAN data type

    • Non-zero numeric values are implicitly converted to the BOOLEAN value TRUE

    • The numeric value of 0 is implicitly converted to the BOOLEAN value FALSE

  • Character data type to BOOLEAN data type

    • Character values such as 'true', 't', 'yes', 'y', '1', and 'on' (case-insensitive) are implicitly converted to the BOOLEAN value TRUE

    • Character values such as 'false', 'f', 'no', 'n', '0', and 'off' (case-insensitive) are implicitly converted to the BOOLEAN value FALSE

  • BOOLEAN data type to numeric data type

    • The BOOLEAN value TRUE is implicitly converted to the numeric value 1

    • The BOOLEAN value FALSE is implicitly converted to the numeric value 0

  • BOOLEAN data type to character data type

    • The BOOLEAN value TRUE is implicitly converted to the character value 'TRUE'

    • The BOOLEAN value FALSE is implicitly converted to the character value 'FALSE'

When this parameter is set to false, PL/SQL does not support such implicit conversions.

Note:

This parameter is available starting with Oracle Database 23ai.