当前位置:网站首页>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 suppliers
where upper(supplier_name) like ('TEST%');
or
select * from suppliers
where 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.
边栏推荐
- Binary tree OJ problem
- 理想L9产品力分析:售价45.98万,采用四缸发动机,续航1315公里
- leetcode 1143. Longest common subsequence (medium)
- 按键控制LED状态翻转
- 简单学习GoogleColab的入门级概念
- Nokov motion capture system makes it possible for multi field cooperative UAV to build independently
- 架构实战营模块五作业
- George Washington University: Hanhan Zhou | PAC: auxiliary value factor decomposition with counterfactual prediction in Multi-Agent Reinforcement Learning
- 在 IDEA 里看个书很过分嘛!
- Memcached foundation 5
猜你喜欢
福元医药上市在即:募资净额将达到16亿元,胡柏藩为实际控制人
Modeling specifications: environment settings
在连接数据库的时候遇到了点问题,请问怎么解决呀?
BS-GX-016基于SSM实现教材管理系统
宁愿去996也不要待业在家啦!24岁,失业7个月,比上班更惨的,是没班可上
Basic introduction to C program structure Preview
Continuous delivery blue ocean application
学习DiscoDiffusion的最基础操作
乔治·华盛顿大学 : Hanhan Zhou | PAC:多智能体强化学习中具有反事实预测的辅助价值因子分解
Interface test framework practice (I) | requests and interface request construction
随机推荐
numpy 数组运算机制浅探
Amazon ElastiCache 飞速搭建缓存服务集群,这才叫快
SystemVerilog仿真速率提升
Memcached foundation 4
Topolvm: kubernetes local persistence scheme based on LVM, capacity aware, dynamically create PV, and easily use local disk
buuctf-pwn write-ups (6)
Reporting Classes中uvm_report_server的get_severity_count和get_server用法
Nokov motion capture system makes it possible for multi field cooperative UAV to build independently
Kept to implement redis autofailover (redisha) 17
接口测试框架实战(一) | Requests 与接口请求构造
【系统分析师之路】第六章 复盘需求工程(案例论文)
Tsinghua & Zhiyuan | cogview2: faster and better text image generation model
CLIP:从自然语言监督中学习可迁移的视觉模型
leetcode 1143. Longest common subsequence (medium)
Reading a book in idea is too much!
Kept to implement redis autofailover (redisha) 14
Memcached foundation 5
使用NetworkX对社交网络进行系统的分析:Facebook网络分析案例
宁愿去996也不要待业在家啦!24岁,失业7个月,比上班更惨的,是没班可上
二叉樹oj題目