Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » Database Options » Introduction to database options » Alphabetical list of options

first_day_of_week option [database] Next Page

float_as_double option [compatibility]


Controls the interpretation of the FLOAT keyword.

Allowed values

On, Off

Default

Off

On for Open Client and jConnect connections

Remarks

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, SQL 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 SQL 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/2003 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 SQL 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