Bitesize has changed! We're updating subjects as fast as we can. Visit our new site to find Bitesize guides and clips - and tell us what you think!
Print

ICT

Databases and data capture

Page:

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  1. Back
  2. Next

AND/OR/NOT queries

Applications [application: applications serve a specific purpose, eg Microsoft Word is used for word processing ] such as Microsoft Access use query [query: finding data in a database which has been specified by the user ] language to narrow down search results. A query can look at more than one field.

 

Registration numberMakeModelDate first registeredPriceTaxed
R623 PHMFordFiesta0101986800Y
P887 LHWRover2000103977500Y
X842 PLDFordMondeo0101968100N
P812 WHJPeugeot4060109967000N
T419 PCPCitroenC40109996000Y

This is a list of common terms used in query language with example usage based on the table above:

  1. AND - use to find all records where the make is a Ford AND the price is less than 8000. This would return the Fiesta but not the Mondeo.
  2. OR - use to find all records where the make is a Ford OR Rover. This would only return the Ford Fiesta, the Ford Mondeo and the Rover 200.
  3. NOT - use to find all records where the make is NOT Citroen. This would return all records except the Citroen C4.

In query language, the above examples would look similar to this:

  1. [Make] = "Ford" AND [Price] < 8000
  2. [Make] = "Ford" OR [Make] = "Rover"
  3. [Make] = NOT "Citroen"

Page:

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  1. Back
  2. Next

Back to Data, information and databases index

BBC © 2014 The BBC is not responsible for the content of external sites. Read more.

This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.