0% found this document useful (0 votes)
13 views

MySQL Built in Functions

Uploaded by

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

MySQL Built in Functions

Uploaded by

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

BUILT IN FUNCTIONS

STRING FUNCTIONS
• LOWER(str)
• UPPER(str)
• LEFT(str,n)
• RIGHT(str,n)
• SUBSTRING(str,m,n)
• LTRIM(str)
• RTRIM(str)
• TRIM()
• LENGTH(str)
• REVERSE(str)
• CONCAT(str1, str2,……)
• CONCAT_WS(separator,str1,str2,……)

1
STRING FUNCTIONS

• LOWER(str): Returns the string with all alphabets changed to lower case.
• UPPER(str): Returns the string with all alphabets changed to upper case.
• LEFT(str,n): Returns the leftmost ‘n’ alphabets from the string. If ‘n’ is zero or
negative then empty string is returned.
• RIGHT(str,n): Returns the rightmost ‘n’ alphabets from the string. If ‘n’ is zero or
negative then empty string is returned.
• SUBSTRING(str,m,n): Returns a substring of ‘n’ characters long from the given
string, starting at position ‘m’. If ‘n’ is not given then all the characters starting
from ‘m’ is returned. If ‘m’ is zero then empty string is returned. If ‘m’ is negative
then position is taken from the end of the string. If ‘n’ is zero or negative then
empty string is returned.

STRING FUNCTIONS

• LOWER(str)

• UPPER(str)

2
STRING FUNCTIONS

• LEFT(str,n)

STRING FUNCTIONS

• RIGHT(str,n)

3
STRING FUNCTIONS

• SUBSTRING(str,m,n)

STRING FUNCTIONS

• LTRIM(str) • RTRIM(str)

4
STRING FUNCTIONS

• TRIM()

STRING FUNCTIONS

• LENGTH()

5
STRING FUNCTIONS

• REVERSE()

STRING FUNCTIONS

• CONCAT(str1,str2,……)

• CONCAT_WS(separator,str1,str2,….)

6
NUMERIC FUNCTIONS

• ABS(x)
• MOD(n,m)
• ROUND(x,d)
• POWER(x,n)
• SQRT(x)

NUMERIC FUNCTIONS

• ABS(x)

• MOD(n,m)

7
NUMERIC FUNCTIONS

• ROUND(x,d)

NUMERIC FUNCTIONS

• POWER(x,n)

• SQRT(x)

8
DATE & TIME FUNCTIONS

• DAY(date)
• MONTH(date)
• YEAR(date)
• DAYNAME(date)
• MONTHNAME(date)
• CURDATE()
• NOW() or SYSDATE()
• TIME(date)
• DATE(date time)

DATE & TIME FUNCTIONS

• DAY(date) • DAYNAME(date)

• MONTH(date) • MONTH(date)

• YEAR(date) • YEAR(date)

9
DATE & TIME FUNCTIONS

• NOW() or SYSDATE() • DATE(date time)

• TIME(date time)

10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy