SQL Examples

Check for Duplicates





Back to Top

Extract first and last names from full name







Back to Top

Return records from one table that are not in another







Back to Top

remove a comma from a string







Back to Top

Display horizontal counts







Back to Top

Count number of spaces in a string







Back to Top

Capitalize first character of a string







Back to Top

Date edit (ie Tuesday, June 14 2005)







Back to Top

Group Count







Back to Top

Count by Location







Back to Top

Sum Example







Back to Top

Decode Example







Back to Top

Case & Sum Example







Back to Top

Calculate Age







Back to Top

Rank the Records







Back to Top

Employee totals







Back to Top

Exclude rows from 1st query if they occurr in the 2nd







Back to Top

Limit Row Numbers







Back to Top

Calling a procedure







Back to Top

Calling a Function







Back to Top

Numeric Check







Back to Top

Parsing Street Type from Street Name







Back to Top

Escape Characters







Back to Top

Wild Cards







Back to Top

Between Keyword







Back to Top

Auto Increment







Back to Top

Insert







Back to Top

Update Record







Back to Top

CASE







Back to Top

CASE







Back to Top

CASE







Back to Top

CASE







Back to Top

LIMIT







Back to Top

Sub String







Back to Top

EXCEPT - returns only those columns that are in the first query but not in the second query







Back to Top