Controls the interpretation of the FLOAT keyword.
ON, OFF
OFF
Turning on the FLOAT_AS_DOUBLE option makes the IQ FLOAT keyword behave like Adaptive Server Enterprise's FLOAT keyword when a precision is not specified.
When enabled (set to ON) Sybase IQ interprets all occurrences of the keyword FLOAT as equivalent to the keyword DOUBLE within SQL statements.
When using JDBC and Client Library connections, for example, running Sybase Central, you must set the FLOAT_AS_DOUBLE option to ON. If you do not do this, CREATE JOIN INDEX operations will fail.
By default, IQ FLOAT values are interpreted by Sybase IQ as REAL values. Since Adaptive Server Enterprise treats its own FLOAT values as DOUBLE, enabling this option makes Sybase IQ to 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 it is, so long as it can handle the necessary precision. Adaptive Server Enterprise and Sybase IQ exhibit different default behavior.
The FLOAT_AS_DOUBLE option only takes effect 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