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

Singel Row Functions

The document outlines various single row functions used in SQL, including CONCAT, LENGTH, LOWER, UPPER, SUBSTRING, LEFT, RIGHT, ROUND, CEIL, FLOOR, YEAR, MONTH, and DAY. Each function is accompanied by its purpose and syntax for usage. These functions are essential for string manipulation and numerical operations in database queries.

Uploaded by

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

Singel Row Functions

The document outlines various single row functions used in SQL, including CONCAT, LENGTH, LOWER, UPPER, SUBSTRING, LEFT, RIGHT, ROUND, CEIL, FLOOR, YEAR, MONTH, and DAY. Each function is accompanied by its purpose and syntax for usage. These functions are essential for string manipulation and numerical operations in database queries.

Uploaded by

kousar banu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

single row functions

CONCAT(): Concatenates two or more strings together.


- Syntax:
SELECT CONCAT(string1, string2, ...);

LENGTH(): Returns the length of a string in bytes.


- Syntax:
SELECT LENGTH(string);

LOWER(): Converts a string to lowercase.


- Syntax:
SELECT LOWER(string);

UPPER(): Converts a string to uppercase.


- Syntax:
SELECT UPPER(string);

SUBSTRING(): Extracts a substring from a string.


- Syntax:
SELECT SUBSTRING(string, start, length);

LEFT(): Extracts the leftmost characters of a specified length.


- Syntax:
SELECT LEFT(string, length);

RIGHT(): Extracts the rightmost characters of a specified length.


- Syntax:
RIGHT(string, length);

ROUND(): Rounds a number to a specified number of decimal places.


- Syntax:
SELECT ROUND(number, decimals);

CEIL(): Returns the smallest integer greater than or equal to the given number.
- Syntax:
SELECT CEIL(number);

FLOOR(): Returns the largest integer less than or equal to the given number.
- Syntax:
SELECT FLOOR(number);

YEAR(): Extract the year.


- Syntax:
SELECT YEAR(date_value);

MONTH(): Extract the month


- Syntax:
SELECT MONTH(date_value);

DAY():Extract the date


- Syntax:
SELECT DAY(date_value);

You might also like