First Guide to SQL Anywhere Studio
PART 3. Basic SQL
CHAPTER 12. Selecting Data from Database Tables
So far, you have seen equal (=) and less than (<) as comparison operators. Adaptive Server Anywhere also supports other comparison operators, such as greater than (>), greater than or equal (>=), less than or equal (<=), and not equal (<>).
These conditions can be combined using AND and OR to make more complicated search conditions.
Type the following:
SELECT emp_lname, birth_date FROM employee WHERE birth_date < '1964-3-3' AND emp_lname <> 'whitney'
emp_lname |
birth_date |
---|---|
Cobb |
1960-12-04 |
Jordan |
1951-12-13 |
Breault |
1947-05-13 |
Espinoza |
1939-12-14 |
Dill |
1963-07-19 |
Francis |
1954-09-12 |