,ch03.13605 Page 139 Wednesday, November 29, 2000 4:42
Search ConditionShorthand Simple Booleancheck Multiple searchconditions NULL check ,ch03.13605 Page 140 Wednesday, November 29, 2000 4:42 PM Table 3-9: Search Conditions Using the WHERE Clause Syntax WHERE [NOT] expressioncomparison_operator expression WHERE [NOT] expressioncomparison_operator expression{AND | OR} expression comparison_operatorexpression WHERE [NOT] column_name IS [NOT] NULL Example SELECT au_idFROM authors WHERE au_id = ‘172-32-1176′ SELECT au_idFROM authors WHERE au_lname NOT LIKE ‘John%’ SELECT au_id FROM authors WHERE au_id = ‘172-32-1176′ AND au_lname = ‘White’ SELECT * FROM titles WHERE price IS NULL Usage & Description The operators <, >, <>, >=, <= , and = can be used when comparingexpressions. There are also a numberof special comparison operators, suchas LIKE, described later in this table. The keyword NOT checks for theinverse of any Boolean check basedon the regular operators <, >, <>, >=, <= , and =, in addition to specialoperators such as LIKE, NULL, BETWEEN, IN, EXISTS, ANY, and ALL. AND merges multiple conditions andreturns results when both conditionsare true. AND takes priority over otheroperators. Parentheses in the WHERE clausefurther affect the priority of operators. OR merges multiple conditions andreturns results when either conditionis true. OR takes priority after AND. IS NULL and IS NOT NULL tell thequery to check for null values (or allvalues except null values).
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost PHP MySQL Web Hosting services