Advertisement Upgrade to remove ads

Basic SQL.

<=

less than or equal to

>=

greater than or equal to

BETWEEN

used to define range limits

IN

used to check whether an attribute value matches a value contained within a (sub)set of listed values

<>

Not equal to

IS NULL

used to check whether an attribute value is null

EXISTS

used to check whether an attribute has a value.

LIKE

used to check for similar character strings

*

matches any number of characters. it can be used as the first or last character in the character string

?

matches any single alphabetic character

AND

joins two or more conditions and returns results when all are true

OR

joins two or more conditions and returns results when any are true

NOT

negates an expression

#

qualifies dates

'text'

qualifies text

ORDER BY

lists in sequence

SUM()

gives the total of all rows, satisfying any condition, of the given column

AVG()

gives the average of the given column

MAX()

gives the largest figure in the given column

MIN()

gives the smallest figure in the given column

COUNT()

gives the number of rows satisfying the condition

COUNT(*)

counts the number of rows

DAY()

returns today's date

YEAR()

returns only the year from a date field

ROUND(attribute, 0)

rounds to the nearest whole number

GROUP BY

indicate columns to summarize on

HAVING

indicate group conditions

DISTINCT

omits records that contain duplicate data in the selected fields

table.attribute

format used to identify an attribute of a table when tables being joined have attributes of the same name

& ' ' &

to combine two attributes into a single column

nested query

query inside a query. use in WHERE and HAVING conditions

Please allow access to your computer’s microphone to use Voice Recording.

Having trouble? Click here for help.

We can’t access your microphone!

Click the icon above to update your browser permissions above and try again

Example:

Reload the page to try again!

Reload

Press Cmd-0 to reset your zoom

Press Ctrl-0 to reset your zoom

It looks like your browser might be zoomed in or out. Your browser needs to be zoomed to a normal size to record audio.

Please upgrade Flash or install Chrome
to use Voice Recording.

For more help, see our troubleshooting page.

Your microphone is muted

For help fixing this issue, see this FAQ.

Star this term

You can study starred terms together

NEW! Voice Recording

Create Set