Quick Search:
Oracle PL/SQL Code Library
Find Or Post Oracle Jobs
Oracle Discussion & Chat
 The Oracle AND CLAUSE      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: AND

The AND clause extends SELECT, DELETE, or UPDATE statements by adding one or more conditions to the statement. For example, this SQL SELECTS all of the users in the users table who have the first name 'john':

SELECT * FROM users 
WHERE first_name = 'john';

By adding an AND clause, the SELECT statement can be made more selective:

SELECT * FROM users 
WHERE first_name = 'john'
AND city = 'seattle';

This statement returns only those users whose first name is 'john' and whose city is listed as 'seattle';

Multiple AND statements may be used, adding as many conditions as needed:

SELECT * FROM users 
WHERE first_name = 'john'
AND city = 'seattle'
AND state = 'washington'
AND zipcode = '98111';

Related Code Snippets:
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 19 users online    © 2009 psoug.org
Forgot your password?