The UCASE() Function
The UCASE() function converts the value of a field to uppercase.MySQL UCASE() Syntax
SELECT UCASE(column_name) FROM table_name;Syntax for SQL Server
SELECT UPPER(column_name) FROM table_name;
The LCASE() Function
The LCASE() function converts the value of a field to lowercase.
MySQL LCASE() Syntax
SELECT LCASE(column_name) FROM table_name;Syntax for SQL Server
SELECT LOWER(column_name) FROM table_name;
The First Letter Capital sntax (UCFirst() alternative):
The below script converts the selected column field value to First Letter Capital with rest to lower case.MySQL Syntax
SELECT CONCAT(LCASE(SUBSTRING(a_column_name, 1, 1)),Syntax for SQL Server
LCASE(SUBSTRING(a_column_name, 2))) as a_column_name FROM table_name;
SELECT CONCAT(LCASE(SUBSTRING(a_column_name, 1, 1)),
LCASE(SUBSTRING(a_column_name, 2))) as a_column_name FROM table_name;
No comments:
Post a Comment
Please post any queries and comments here.