当前位置:网站首页>Oracle/PLSQL: Upper Function
Oracle/PLSQL: Upper Function
2022-06-27 01:46:00 【yuanlnet】
In Oracle/PLSQL, the upper function converts all letters in the specified string to uppercase. If there are characters in the string that are not letters, they are unaffected by this function.
Syntax
The syntax for the upper function is:
upper( string1 )string1 is the string to convert to uppercase.
Applies To
- Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
For Example
upper('Tech on the Net'); | would return 'TECH ON THE NET' |
upper('george burns 123 '); | would return 'GEORGE BURNS 123 ' |
Frequently Asked Questions
Question: How do you incorporate the Oracle upper function with the LIKE condition? I'm trying to query against a free text field for all records containing the word "test". The problem is that it can be entered in the following ways: TEST, Test, or test.
Answer: To answer this question, let's take a look at an example.
Let's say that we have a suppliers table with a field called supplier_name that contains the values TEST, Test, or test.
If we wanted to find all records containing the word "test", regardless of whether it was stored as TEST, Test, or test, we could run either of the following SQL statements:
select * from supplierswhere upper(supplier_name) like ('TEST%');or
select * from supplierswhere upper(supplier_name) like upper('test%')These SQL statements use a combination of the upper function and the LIKE condition to return all of the records where the supplier_name field contains the word "test", regardless of whether it was stored as TEST, Test, or test.
边栏推荐
猜你喜欢

I encountered some problems when connecting to the database. How can I solve them?

Systematic analysis of social networks using Networkx: Facebook network analysis case

通过Rust语言计算加速技术突破图片识别性能瓶颈

理想L9产品力分析:售价45.98万,采用四缸发动机,续航1315公里

Browser cache

二叉树oj题目

XSS attack notes (Part 1)

“所有专业都在劝退”,对大学生最友好的竟然是它?

博日科技招股书失效,中金公司已停止对其辅导,放弃港交所上市?

idea 插件开发一些异常处理
随机推荐
Why divide the training set and the test set before normalization?
memcached基礎12
Browser cache
Memcached foundation 7
uvm中的config机制方法总结(二)
Oracle/PLSQL: Trim Function
Arbre binaire OJ sujet
Meituan: data management and pit avoidance strategy summarized after stepping on Thunder for several years
Oracle/PLSQL: Replace Function
按键控制LED状态翻转
ThreadLocal详解
Some exception handling for idea plug-in development
Oracle/PLSQL: Rpad Function
Memcached foundation 1
SystemVerilog simulation speed increase
Memcached foundation 9
Memcached foundation 6
速看!2022年6月编程语言排行榜出炉!第一名太牛啦
memcached基础10
接口测试框架实战(一) | Requests 与接口请求构造