![]() |
SQL-J Language Reference
|
Reference Manual |
WHERE clauseA WHERE clause is an optional part of a SelectExpression, DELETE statement, or UPDATE statement. The WHERE clause lets you select rows based on a boolean expression. Only rows for which the expression evaluates to TRUE are returned in the result, or, in the case of a DELETE statement, deleted, or, in the case of an UPDATE statement, updated. SyntaxWHERE Boolean expression SQL-J extends the SQL-92 WHERE clause to allow any boolean expression. Most of the general expressions listed in Table 1-9, "Table of Expressions", can result in a boolean value. In addition, SQL-J allows the following as expressions in a WHERE clause:
For example, the following are valid SQL-J WHERE clauses: WHERE TRUE WHERE tab.userTypeColumn.methodReturningBoolean(17, abcd) WHERE tab.booleanColumn WHERE (CLASS COM.ACMEWeb.WebPage).staticBooleanMethod() WHERE tab.userTypeColumn->booleanField WHERE (CLASS COM.ACMEWeb.WebPage)->staticBooleanField In addition, there are the more common boolean expressions. Specific SQL-J boolean operators listed in Table 1-10, "SQL-J Boolean Operators", take one or more operands; the expressions return a boolean value. WHERE clause ExamplesWHERE DATE'1993-01-01' < DATE'1996-01-01' -- returns true WHERE 'This value is here' LIKE '%value_is%' -- evaluates to true
-- find the flights where no business-class seats have
SELECT *
-- update only specific rows SELECT Part |
|
![]() Cloudscape Version 3.6 For information about Cloudscape technical support, go to: www.cloudscape.com/support/.Copyright © 1998, 1999, 2000 Informix Software, Inc. All rights reserved. |