[完成]针对需要此内容的人。.我将对其进行编辑,并将答案放在下面。

如何使用子查询使LName和FName全部变为CAPS?
我已经制作了所有LName和FName CAPS,但没有在子查询中使用此代码

Select UPPER(LName) AS "Lastname", UPPER(FName) AS "Firstname" FROM Trainers;


输出:

+-----------+-----------+
| Lastname  | Firstname |
+-----------+-----------+
| MONTANO   | GERALD    |
| ALEJANDRO | LEONARD   |
| MONTEZ    | GARY      |
| GUILLERMO | JACKIE    |
| SANCHEZ   | VERNA     |
| GABORNI   | MICHELLE  |
+-----------+-----------+


桌上运动鞋

+-----------+-----------+----------+-------+
| TrainerNo | LName     | FName    | Rate  |
+-----------+-----------+----------+-------+
| 00804871  | Montano   | Gerald   | 200   |
| 00807461  | Alejandro | Leonard  | 175   |
| 00807462  | Montez    | Gary     | 150   |
| 00823253  | Guillermo | Jackie   | 200   |
| 00827320  | Sanchez   | Verna    | 125   |
| 00845907  | Gaborni   | Michelle | 150   |
+-----------+-----------+----------+-------+


回答:

Select UPPER(Lname) AS "Lastname", UPPER(FName) AS "Firstname" from Trainers Where Rate <= (Select Max(Rate) from Trainers);

最佳答案

如果要在子查询中返回以大写形式与第二个名称并置的名字。然后,您可以执行此操作。

Select * from Table Name, (Select UPPER(LName) + UPPER(FName) FROM Trainers) as Name

关于c# - MySQL子查询以大写显示,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/35389171/

10-17 02:31