Top Operator

TOP OPERATOR We may want to have only a certain number of records returned. The keyword TOP will allow us to limit the number of rows returned. You can either set the number of rows to return or you can set a percentage. The keyword PERCENT is used to indicate a...

Combining Operators

We can include as many conditions to our query as we want. We can set multiple conditions on the same column or we can use two or more columns to help decide what should be returned. Two conditions could be given and if either of them contain a match, the...

Distinct Operator

Distinct Operator There may be times when we want to see only one item in a list even though it may appear many times in the database. The keyword DISTINCT will return a single result for each unique value in the column. This example returns only one record for each...

Aliases

Because I made a calculation, best practice dictates I give the column a descriptive name using the keyword AS, and then the name surrounded by single quotes, because I have a space in the column name. Using the keyword AS with a name is known as aliasing. Giving an...