Oracle UPPER Function


/ Published in: SQL
Save to your folder(s)

A few examples of the UPPER function.


Copy this code and paste it in your HTML
  1. --Example 1
  2. SELECT UPPER('Database Star') FROM dual;
  3.  
  4. --Example 2
  5. SELECT UPPER('Database 2016') FROM dual;
  6.  
  7. --Example 3
  8. SELECT first_name, last_name
  9. FROM customers
  10. WHERE UPPER(first_name) = 'JOHN';
  11.  
  12. --Example 4
  13. SELECT first_name, last_name, country
  14. FROM customers
  15. WHERE UPPER(country) = UPPER('usa');
  16.  
  17.  
  18.  
  19. --Example 5
  20. SELECT first_name, last_name, country
  21. FROM customers
  22. WHERE UPPER(country) LIKE ('U%');
  23.  
  24.  
  25. --Example 6
  26. SELECT first_name, last_name, country
  27. FROM customers
  28. WHERE UPPER(first_name) LIKE UPPER('m%');
  29.  
  30.  
  31. --Example 7
  32. SELECT UPPER(SUBSTR('database star',1,1)) || SUBSTR('database star',2) AS upper_text FROM dual;

URL: http://www.databasestar.com/oracle-upper/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.