How can we help?

You can also find more resources in our Help Center.

31 terms

SQL

Basic SQL.
STUDY
PLAY
<=
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