4
Using Functions
Keywords Introduced
LEFT • RIGHT • SUBSTRING • LTRIM • RTRIM • UPPER • LOWER • GETDATE • DATEPART • DATEADD • DATEDIFF • ROUND • PI • POWER • CAST • ISNULL • NEWID
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 used functions in four distinct categories: character functions, date/time functions, ...
Get The Language of SQL, 3rd 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.