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

SQL Anywhere 11.0.1 » SQL Anywhere Server - SQL Reference » Using SQL » SQL data types » Data type conversions » Comparisons between data types

 

Comparisons between time and date data types

SQL Anywhere uses the following rules when comparing time and date data types. The rules are examined in the order listed, and the first rule that applies is used:

  1. If the data type of either argument is TIME, convert both to TIME and compare.

  2. If either data type has the type DATE or TIMESTAMP, convert to both to TIMESTAMP and compare.

    For example, if the two arguments are of type REAL and DATE, they are both converted to TIMESTAMP.

  3. If one argument has NUMERIC data type and the other has FLOAT, convert both to DOUBLE and compare.