-3

Example:

Table name : example with column Emp_name

emp_name    

Ron         
Raj         
Robert

I want to display the name raj in upper case for the table example.

jarlh
  • 42,561
  • 8
  • 45
  • 63
G.Gad
  • 1
  • 1

2 Answers2

1

If I understand your question, I think you should write your query as follows:

SELECT UCASE(emp_name) FROM your_table WHERE emp_name = Raj;

If you want to select all the emp_name column and display it in uppercase, you should use this instead:

SELECT UCASE(emp_name) FROM your_table;
ishmaelMakitla
  • 3,784
  • 3
  • 26
  • 32
zolastro
  • 918
  • 12
  • 29
  • 1
    Either that or `SELECT CASE WHEN emp_name='Raj' THEN UCASE(emp_name) ELSE emp_name as new_emp_name FROM your_table`, if he wanted to return all names but only capitalise Raj – tomb Aug 16 '16 at 23:53
  • Is `UCASE()` MySQL or SQL Server? – jarlh Aug 17 '16 at 05:36
  • The UPPER function is used for SQL Server. Other SQL platforms may use the UCASE function. – zolastro Aug 17 '16 at 12:48
0

Question is not clear whether you are asking for My sql

use UPPER() for MS SQL Server