Contents Index FIRST_DAY_OF_WEEK option [database] FOR_XML_NULL_TREATMENT option [database]

ASA Database Administration Guide
  Database Options
    Alphabetical list of options

FLOAT_AS_DOUBLE option [compatibility]


Function 

Controls the interpretation of the FLOAT keyword.

Allowed values 

ON, OFF

Default 

OFF

ON for Open Client and JDBC connections

Description 

The FLOAT_AS_DOUBLE option makes the FLOAT keyword behave like Adaptive Server Enterprise's FLOAT keyword when a precision is not specified.

When enabled (set to ON), all occurrences of the keyword FLOAT are interpreted as equivalent to the keyword DOUBLE within SQL statements.

By default, Adaptive Server Anywhere FLOAT values are interpreted by Adaptive Server Enterprise as REAL values. Since Adaptive Server Enterprise treats its own FLOAT values as DOUBLE, enabling this option makes Adaptive Server Anywhere treat FLOAT values in the same way Enterprise treats FLOAT values.

REAL values are four bytes; DOUBLE values are eight bytes. According to the ANSI SQL/92 specification, FLOAT can be interpreted based on the platform. It is up to the database to decide what size the value is, so long as it can handle the necessary precision. Adaptive Server Enterprise and Adaptive Server Anywhere exhibit different default behavior.

The FLOAT_AS_DOUBLE option takes effect only when no precision is specified. For example, the following statement is not affected by the option setting:

create table t1(
   c1 float(5)
)

The following statement is affected by the option setting:

create table t2(
   c1 float)
// affected by option setting

Contents Index FIRST_DAY_OF_WEEK option [database] FOR_XML_NULL_TREATMENT option [database]