10.12.2012 Views

Application Programming and SQL Guide - Kmlinux

Application Programming and SQL Guide - Kmlinux

Application Programming and SQL Guide - Kmlinux

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

If a search condition contains a column of a distinct type, the value to which that<br />

column is compared must be of the same distinct type, or you must cast the value<br />

to the distinct type. See Chapter 16, “Creating <strong>and</strong> using distinct types,” on page<br />

359 for more information about distinct types.<br />

Table 2 lists the type of comparison, the comparison operators, <strong>and</strong> an example of<br />

how each type of comparison that you can use in a predicate in a WHERE clause.<br />

Table 2. Comparison operators used in conditions<br />

Type of comparison Comparison operator Example<br />

Equal to = DEPTNO = ’X01’<br />

Not equal to DEPTNO ’X01’<br />

Less than < AVG(SALARY) < 30000<br />

Less than or equal to = 21<br />

Greater than > SALARY > 2000<br />

Greater than or equal to >= SALARY >= 5000<br />

Not greater than

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!