4. Using Functions

Keywords Introduced

LEFT  •  RIGHT  •  SUBSTRING  •  LTRIM  •  RTRIM  •  UPPER  •  LOWER  •  GETDATE  •  DATEPART  •  DATEDIFF  •  ROUND  •  PI  •  POWER  •  ISNULL

Anyone familiar with Microsoft Excel is probably aware that functions provide a huge amount of functionality for the typical spreadsheet user. Without the ability to use functions, most of the data available in spreadsheets would be of limited value. The same is true in the world of SQL. Familiarity with SQL functions will greatly enhance your ability to generate dynamic results for anyone viewing data or reports generated from SQL.

This chapter covers a wide variety of some of the most commonly used functions in four different categories: character functions, date/time ...

Get The Language of SQL, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.