SlideShare a Scribd company logo
By : Dhirendra Chauhan
“String “
Function
“String “
Function
1. UPPER /UCASE()
2. LOWER/LCASE()
3. LTRIM()
4. RTRIM
5. TRIM()
6. LENGTH()
7. LEFT( )
8. RIGHT()
9. INSTR()
10. INITCAP()
11. CONCAT()
12. SUBSTR / SUBSTRING /
MID()
13. POSITION()
14. CHAR()
V23 function-2
UPPER() / UCASE()
Upper() Function Convert a string Small
to upper-case:
Syntax Example
SELECT UCASE(Col_Name)
FROM table_name;
SELECT UCASE(Name)
FROM Employees1;
OUTPUT
Lower() / LCASE()
Lower() Function Convert a string upper
to Small-case:
Syntax Example
SELECT LCASE(Col_Name)
FROM table_name;
SELECT LCASE(Name)
FROM Employees1;
OUTPUT
LTRIM()
The LTRIM() function removes leading
spaces from a string
Syntax Example
SELECT LTRIM(Col_Name)
FROM table_name;
SELECT LTRIM(Name)
FROM Employees1;
OUTPUT
RTRIM()
The RTRIM() function removes trailing
spaces from a string.
Syntax Example
SELECT RTRIM(Col_Name)
FROM table_name;
SELECT RTRIM(Name)
FROM Employees1;
OUTPUT
TRIM()
The TRIM() function removes leading and
trailing spaces from a string.
Syntax Example
SELECT TRIM(Col_Name)
FROM table_name;
SELECT TRIM(Name)
FROM Employees1;
OUTPUT
LENGTH()
The LENGTH() function returns the length of a
string (in bytes).
Syntax Example
SELECT Length(Col_Name)
FROM table_name;
SELECT Length(Name)
FROM Employees1;
OUTPUT
LEFT(string, Number of Char)
The LEFT() function extracts a number of
characters from a string (starting from
left).
Syntax Example
SELECT LEFT(Col_Name , No_of_Char)
FROM table_name;
SELECT LEFT (Name,3)
FROM Employees1;
OUTPUT
RIGHT(string, Number of Char)
The RIGHT() function extracts a
number of characters from a string
(starting from right).
Syntax Example
SELECT RIGHT(Col_Name ,
Number of Char)
FROM table_name;
SELECT RIGHT(Name,3)
FROM Employees1;
OUTPUT
INSTR()
The INSTR() function returns the position of the first
occurrence of a string in another string.
Syntax Example
SELECT INSTR(string1, string2)
FROM table_name;
SELECT INSTR( NAME, ” i ”)
FROM Employees1;
OUTPUT
INITCAP()
Syntax Example
SELECT INITCAP (string); SELECT INITCAP (“dhirendra chauhan”);
The INITCAP() function sets the first
letter of each word in uppercase, all other
letters in lowercase.
OUTPUT
CONCAT(String1, String2)
The CONCAT() function adds two or
more expressions together.
Syntax Example
SELECT CONCAT(String1,
String2) FROM table_name;
SELECT CONCAT(Name , City)
FROM Employees1;
OUTPUT
SUBSTR(string, start, length)
OR
SUBSTRING(string, start, length)
OR
MID( string, start, length)
These function extracts a
substring from a string
(starting at any position).
Syntax
SELECT SUBSTR/SUBSTRING/MID(string, start, length) FROM table_name;
Example
SELECT SUBSTR(NAME, 3, 4) FROM Employees1;
SELECT SUBSTRING(NAME, 3, 4) FROM Employees1;
SELECT MID(NAME, 3, 4) FROM Employees1;
OUTPUT
POSITION(substring IN string)
The POSITION() function returns the position of the first occurrence
of a substring in a string.
If the substring is not found within the original string, this function
returns 0.
Syntax Example
SELECT POSITION(substring IN string)
FROM table_name;
SELECT POSITION(“a” IN Name)
FROM Employees1;
OUTPUT
The CHAR()
The CHAR() function returns
the character based on the
ASCII code.
Syntax Example
SELECT CHAR(Number) ; SELECT CHAR(65) ;
OUTPUT
THANK
YOU

More Related Content

ODP
Mysql1
PDF
The Ring programming language version 1.9 book - Part 124 of 210
ODP
Prabu's sql quries
PPT
PLSQL Cursors
ODP
My sql Syntax
PPSX
Oracle Training in Kochi | Trivandrum |Thrissur
PDF
PLSQL CURSOR
Mysql1
The Ring programming language version 1.9 book - Part 124 of 210
Prabu's sql quries
PLSQL Cursors
My sql Syntax
Oracle Training in Kochi | Trivandrum |Thrissur
PLSQL CURSOR

What's hot (19)

PDF
The Ring programming language version 1.8 book - Part 117 of 202
PDF
Cursors
PDF
Hacking parse.y (RubyKansai38)
PPTX
PL/SQL - CURSORS
PDF
GeoGebra JavaScript CheatSheet
PPT
7a advanced tsql
PDF
Hacking Parse.y with ujihisa
RTF
Trigger and cursor program using sql
ODP
Mysqlppt
DOC
PPTX
F# Eye For The C# Guy - Seattle 2013
DOC
Sql Queries
DOCX
Trig
PPTX
Structured Query Language(SQL)
DOC
Function Call Optimization
PPT
Oracle PL sql 3
PPTX
React Js Training In Bangalore | ES6 Concepts in Depth
PDF
Triggers in plsql
PPT
Oracle naveen Sql
The Ring programming language version 1.8 book - Part 117 of 202
Cursors
Hacking parse.y (RubyKansai38)
PL/SQL - CURSORS
GeoGebra JavaScript CheatSheet
7a advanced tsql
Hacking Parse.y with ujihisa
Trigger and cursor program using sql
Mysqlppt
F# Eye For The C# Guy - Seattle 2013
Sql Queries
Trig
Structured Query Language(SQL)
Function Call Optimization
Oracle PL sql 3
React Js Training In Bangalore | ES6 Concepts in Depth
Triggers in plsql
Oracle naveen Sql
Ad

Similar to V23 function-2 (20)

PPTX
Templates
PPT
Chapter-5.ppt
PPTX
2 puc cs.pptx bsbshsjshsbbsjsjshdbdbbdbdd
PPT
Sql operators & functions 3
PPTX
V22 function-1
PDF
0716330552518_DBMS_LAB_THEORY_SQL_OPERATOR (1).pdf
PPTX
character function in database managemnet system
PDF
The Task For this assignment you will write a rudimentary text edi.pdf
PPTX
Math, Text, Date Functions of MySQL for Class-12 CBSE
PPTX
My SQL.pptx
PPTX
Commands
PPT
ODP
PPTX
SQL Class Note By Amit Maity PowerPoint Presentation
PDF
Creating Lazy stream in CSharp
PPT
Sql dml & tcl 2
PPTX
Functions
DOCX
Database Query Using SQL_ip.docx
PDF
The Ring programming language version 1.5.3 book - Part 35 of 184
Templates
Chapter-5.ppt
2 puc cs.pptx bsbshsjshsbbsjsjshdbdbbdbdd
Sql operators & functions 3
V22 function-1
0716330552518_DBMS_LAB_THEORY_SQL_OPERATOR (1).pdf
character function in database managemnet system
The Task For this assignment you will write a rudimentary text edi.pdf
Math, Text, Date Functions of MySQL for Class-12 CBSE
My SQL.pptx
Commands
SQL Class Note By Amit Maity PowerPoint Presentation
Creating Lazy stream in CSharp
Sql dml & tcl 2
Functions
Database Query Using SQL_ip.docx
The Ring programming language version 1.5.3 book - Part 35 of 184
Ad

More from Dhirendra Chauhan (20)

PPTX
V35 keys-c
PPTX
V34 numeric function-c
PPTX
V33 date function-c
PPTX
V31 having
PPTX
V30 full join(union intersect etc)
PPTX
V29 group by-c
PPTX
PPTX
V27 constraint
PPTX
PPTX
V25 sql index
PPTX
V24 cartesion product-c
PPTX
V21 in operator
PPTX
V20 bet ween operator-c
PPTX
V19 join method-c
PPTX
V18 alias-c
PPTX
V17 show command-c
PPTX
V16 sql comments-c
PPTX
V15 like operator-c
PPTX
V3 employment-unemployment
PPTX
V2 infrastructure
V35 keys-c
V34 numeric function-c
V33 date function-c
V31 having
V30 full join(union intersect etc)
V29 group by-c
V27 constraint
V25 sql index
V24 cartesion product-c
V21 in operator
V20 bet ween operator-c
V19 join method-c
V18 alias-c
V17 show command-c
V16 sql comments-c
V15 like operator-c
V3 employment-unemployment
V2 infrastructure

Recently uploaded (20)

PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
Cell Types and Its function , kingdom of life
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
master seminar digital applications in india
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Final Presentation General Medicine 03-08-2024.pptx
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Module 4: Burden of Disease Tutorial Slides S2 2025
01-Introduction-to-Information-Management.pdf
Renaissance Architecture: A Journey from Faith to Humanism
Cell Types and Its function , kingdom of life
O5-L3 Freight Transport Ops (International) V1.pdf
master seminar digital applications in india
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Anesthesia in Laparoscopic Surgery in India
human mycosis Human fungal infections are called human mycosis..pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Cell Structure & Organelles in detailed.
Microbial disease of the cardiovascular and lymphatic systems
Final Presentation General Medicine 03-08-2024.pptx

V23 function-2