0% found this document useful (0 votes)
1 views2 pages

1 +Functions+-+Intro

The document outlines various built-in SQL functions used for data operations, including mathematical calculations, string manipulations, and date/time handling. It categorizes these functions into scalar, aggregate, window, table, and system functions, providing examples for each category. Additionally, it lists several important SQL functions such as AVG, COUNT, and CONCAT, among others.

Uploaded by

tokixit492
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views2 pages

1 +Functions+-+Intro

The document outlines various built-in SQL functions used for data operations, including mathematical calculations, string manipulations, and date/time handling. It categorizes these functions into scalar, aggregate, window, table, and system functions, providing examples for each category. Additionally, it lists several important SQL functions such as AVG, COUNT, and CONCAT, among others.

Uploaded by

tokixit492
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

---------------------- SQL Functions ----------------------

/*
-- SQL provides many built-in functions to perform operations on data.
-- These functions are useful while performing mathematical calculations, string
concatenations, sub-strings, date & time etc.
-- SQL functions can be broadly categorized into following categories:
- Scalar functions: functions that take a single row/value as input and return
a single value
- Aggregate functions: functions that take multiple rows/values as input and
return a single value
- Window functions: subset of aggregate functions that can operate on a subset
of rows
- Table functions: functions that return results in tabular format
- System functions: functions that perform control operations or return system-
level information
*** We will work on couple of functions from each of above categories.

We have already seen below functions:


1.) AVG
2.) COUNT
3.) SUM
4.) MIN
5.) MAX
6.) ROW_NUMBER

-- Other important functions


ABS
ADD_MONTHS
AS_DATE, AS_CHAR, AS_INTEGER
CASE
CAST
CEIL, FLOOR
CHARINDEX
COALESCE
COMPRESS
CONCAT
CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP
DATE_PART
DATE_TRUNC
DATEADD
DATEDIFF
DAYNAME
RANK, DENSE_RANK
STARTSWITH, ENDSWITH
EXTRACT
GET_DDL
HASH
HOUR/MINUTE/SECOND
IFF
IFNULL
INSERT
IS_DATE, IS_CHAR, IS_INTEGER
LAG
LAST_DAY
LEFT
RIGHT
LEN, LENGTH
LOWER, UPPER
LTRIM, RTRIM
MOD
MONTHNAME
NVL
REPLACE
REVERSE
RIGHT
SPLIT
SPLIT_PART
SUBSTR, SUBSTRING
SYSDATE
TO_DATE, TO_CHAR, TO_INTEGER
TRANSLATE
TRIM
TRUNCATE, TRUNC
YEAR/DAY/WEEK/MONTH/QUARTER

--SYSTEM FUNCTIONS:
CURRENT_ACCOUNT
CURRENt_USER
CURRENT_SESSION
CURRENT_ROLE
CURRENT_REGION
*/

You might also like