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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.