当前位置:网站首页>Oracle/PLSQL: Upper Function
Oracle/PLSQL: Upper Function
2022-06-27 01:35: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.
边栏推荐
- UVM in UVM_ config_ Setting and obtaining DB non-linear
- Kept to implement redis autofailover (redisha) 15
- Memcached Foundation
- The world is very big. Some people tattoo QR codes on their necks
- UVM中uvm_config_db非直线的设置与获取
- UVM中uvm_report_enabled的用法
- 在 IDEA 里看个书很过分嘛!
- flutter系列之:flutter中的flow
- I encountered some problems when connecting to the database. How can I solve them?
- 在连接数据库的时候遇到了点问题,请问怎么解决呀?
猜你喜欢
随机推荐
Memcached foundation 6
接口隔离原则
Weibo comments on high performance and high availability architecture
【毕业季】角色转换
图论知识及其应用初步调研
1.44寸TFT-LCD显示屏取模教程
宁愿去996也不要待业在家啦!24岁,失业7个月,比上班更惨的,是没班可上
Basic introduction to C program structure Preview
Oracle/PLSQL: CharToRowid Function
UVM中config_db机制的使用方法
做了两天的唯美蝴蝶动画
BS-GX-016基于SSM实现教材管理系统
Bs-gx-016 implementation of textbook management system based on SSM
Find the minimum value in the rotation sort array ii[classical Abstract dichotomy + how to break the game left, middle and right are equal]
Memcached foundation 3
Summary of config mechanism and methods in UVM (2)
Keepalived 实现 Redis AutoFailover (RedisHA)16
Systematic analysis of social networks using Networkx: Facebook network analysis case
Amazon ElastiCache 飞速搭建缓存服务集群,这才叫快
我靠副业一个月挣了3W块:你看不起的行业,真的很挣钱!









