(Contents)(Previous)(Next)

Comparison Operations

Comparison conditions are formulated using the following symbols:

= equal to

<> not equal to

> greater than

>= greater than or equal to

< less than

<= less than or equal to

Which customer has an empty or a positive account?

SELECT title, name, account

FROM customer

WHERE account >= 0

Which customer has a positive account?

SELECT title, name, account

FROM customer

WHERE account > 0

Which customers are companies?

SELECT title, name

FROM customer

WHERE title = 'Comp'

Selection of all customers who, in alphabetical order, follow 'Peters':

SELECT firstname, name, city

FROM customer

WHERE name > 'Peters'


(Contents)(Previous)(Next)