The LCASE() function converts the value of a field to lowercase.
SQL LCASE() Syntax
SELECT LCASE(column_name)
FROM table_name;
Syntax for SQL Server
Syntax for SQL Server
Subject_No
|
Subject_Name
|
Dept_Name
|
SU01
|
Limit Process
|
Mathematics
|
SU02
|
Linear Programming
|
Mathematics
|
SU03
|
Atomic and Molecular Structure
|
Chemistry
|
SU04
|
Cell Biology
|
Botany
|
SU05
|
Genetics
|
Zoology
|
SU06
|
Computer Architecture
|
Computer Science
|
SU07
|
Relativity and structure of matter
|
Physics
|
Subject_Name
|
Dept_Name
|
limit process
|
Mathematics
|
linear programming
|
Mathematics
|
atomic and molecular structure
|
Chemistry
|
cell biology
|
Botany
|
genetics
|
Zoology
|
computer architecture
|
Computer Science
|
relativity and structure of matter
|
Physics
|
SELECT LOWER(column_name)
FROM table_name;
SQL LCASE() Example
We have the following "Subject" table:
Now we want to select the content of the "Subject_Name" and "Dept_Name" columns above, and convert the " Subject_Name " column to
lowercase .
We use the following SELECT statement:
SELECT LCASE(Subject_Name) AS Subject_Name,Dept_Name
FROM subject;
The result-set will look like this:
SQL LCASE() Example
We have the following "Subject" table:
Now we want to select the content of the "Subject_Name" and "Dept_Name" columns above, and convert the " Subject_Name " column to
lowercase .
We use the following SELECT statement:
FROM subject;
The result-set will look like this:
Post a Comment