为此,请UPPER()
在MySQL专栏中使用。让我们首先创建一个表-
mysql> create table DemoTable627 (Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,FirstName varchar(100));
使用插入命令在表中插入一些记录-
mysql> insert into DemoTable627(FirstName) values(UPPER('John')); mysql> insert into DemoTable627(FirstName) values(UPPER('Sam')); mysql> insert into DemoTable627(FirstName) values(UPPER('Mike')); mysql> insert into DemoTable627(FirstName) values(UPPER('Carol')); mysql> insert into DemoTable627(FirstName) values(UPPER('dAVID'));
使用select语句显示表中的所有记录-
mysql> select *from DemoTable627;
这将产生以下输出-
+----+-----------+ | Id | FirstName | +----+-----------+ | 1 | JOHN | | 2 | SAM | | 3 | MIKE | | 4 | CAROL | | 5 | DAVID | +----+-----------+ 5 rows in set (0.00 sec)