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

SQL Anywhere 12.0.1 » SQL Anywhere Server - SQL Usage » Query and modify data » Queries » The WHERE clause: Specifying rows


Search conditions that compare dates

You can use operators other than equals to select a set of rows that satisfy the search condition. The inequality operators (< and >) can be used to compare numbers, dates, and even character strings.

 List all employees born before March 13, 1964
  • In Interactive SQL, execute the following query:

    SELECT Surname, BirthDate
       FROM Employees
       WHERE BirthDate < 'March 13, 1964'
       ORDER BY BirthDate DESC;
    Surname BirthDate
    Ahmed 1963-12-12
    Dill 1963-07-19
    Rebeiro 1963-04-12
    Garcia 1963-01-23
    Pastor 1962-07-14
    ... ...
 See also