teach-ict.com logo

THE education site for computer science and ICT

Query Operators

A 'query' is a database term. You extract or modify data by running a query.

To create the query you need to use some standard SQL database command words along with 'query operators'.

The SQL database commands describe the basic operation to be carried out such as INSERT, UPDATE, SELECT

And the 'query operators' reduce the numbers of records being handled in some way.

For example

= (Equals) means the condition has to be equal to something

e.g. SELECT * FROM Customer WHERE CustomerID = 'HJONES'

would extract all records (the * bit)from the Customer table as long as the CustomerID matches 'HJONES'

Other query operators are (there are many others)

> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
NOT - finds records that do not meet the condition
OR - finds records that match one condition OR another.

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: Query Operators

2020-10