

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Convert the case of every value in a MySQL Column to uppercase
For this, use UPPER() on MySQL column. Let us first create a table −
mysql> create table DemoTable627 (Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,FirstName varchar(100)); Query OK, 0 rows affected (0.62 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable627(FirstName) values(UPPER('John')); Query OK, 1 row affected (0.11 sec) mysql> insert into DemoTable627(FirstName) values(UPPER('Sam')); Query OK, 1 row affected (0.11 sec) mysql> insert into DemoTable627(FirstName) values(UPPER('Mike')); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable627(FirstName) values(UPPER('Carol')); Query OK, 1 row affected (0.17 sec) mysql> insert into DemoTable627(FirstName) values(UPPER('dAVID')); Query OK, 1 row affected (0.70 sec)
Display all records from the table using select statement −
mysql> select *from DemoTable627;
This will produce the following output −
+----+-----------+ | Id | FirstName | +----+-----------+ | 1 | JOHN | | 2 | SAM | | 3 | MIKE | | 4 | CAROL | | 5 | DAVID | +----+-----------+ 5 rows in set (0.00 sec)
- Related Questions & Answers
- Convert the column to a case-sensitive collation in MySQL?
- Get field value and convert a particular character from it to uppercase with MySQL
- How to get the sum for every distinct value in another column in MySQL?
- MySQL query to delete last two words from every column value
- Convert a String to Uppercase in C
- How to convert all the records in a MySQL table from uppercase to lowercase?
- Count the number of comma’s in every record from a comma-separated value column in MySQL
- How to select the maximum value of a column in MySQL?
- Apply uppercase to a column in Pandas dataframe
- How to update a specific column value fetched with CASE statement?
- Change the decimal point of every value in an R data frame column.
- How to convert a string into uppercase in AngularJS?
- Convert text to uppercase with CSS
- MySQL add “prefix” to every column?
- How to convert the content of the file into uppercase or lowercase?
Advertisements