自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

帶您了解Oracle文本函數(shù)

數(shù)據(jù)庫 Oracle
Oracle數(shù)據(jù)庫提供了很多函數(shù)供我們使用,下面為您介紹的Oracle函數(shù)是文本函數(shù),如果您對(duì)此方面感興趣的話,不妨一看。

Oracle文本函數(shù)使我們常用的函數(shù),下面就為您介紹幾種Oracle文本函數(shù)的用法,供您參考學(xué)習(xí),希望可以讓您對(duì)Oracle文本函數(shù)有更深的認(rèn)識(shí)。

(1)UPPER、LOWER和INITCAP

這三個(gè)函數(shù)更改提供給它們的文體的大小寫。

select upper(product_name) from product;

select lower(product_name) from product;

select initcap(product_name) from product;
函數(shù)INITCAP能夠整理雜亂的文本,如下:

select initcap(‘this TEXT hAd UNpredictABLE caSE’) from dual;
(2)LENGTH

求數(shù)據(jù)庫列中的數(shù)據(jù)所占的長(zhǎng)度。

select product_name,length(product_name) name_length

from product

order by product_name;
(3)SUBSTR

取子串,格式為:

SUBSTR(源字符串,起始位置,子串長(zhǎng)度);

create table item_test(item_id char(20),item_desc char(25));

insert into item_test values(‘LA-101’,’Can, Small’);

insert into item_test values(‘LA-102’,’Bottle, Small’);

insert into item_test values(‘LA-103’,’Bottle, Large’);
取編號(hào):

select substr(item_id,4,3) item_num,item_desc

from item_test;
(4)INSTR

確定子串在字符串中的位置,格式如下:

INSTR(源字符串,要查找的字符串,查找起始位置)

select instr(‘this is line one’,’line’,1) from dual;
其返回值為子串在源字符串中從起始位置開始***次出現(xiàn)的位置。上面例子的返回值為9。

select item_desc , instr(item_desc,’,’,1)

from item_test;
(5)LTRIM、RTRIM和TRIM

去除字符串左邊的空格、去除字符串右邊的空格、去除字符串左右兩邊的空格。

select ltrim(‘ abc def ‘) from dual;

以上就是Oracle文本函數(shù)的用法介紹。

 

 

 

【編輯推薦】

帶您深入了解Oracle觸發(fā)器

創(chuàng)建Oracle包的語法

Oracle過程和函數(shù)的區(qū)別

Oracle to_char函數(shù)的使用

Java調(diào)用Oracle函數(shù)的兩種情況

責(zé)任編輯:段燃 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-10-25 15:20:23

Oracle數(shù)據(jù)轉(zhuǎn)換函

2010-10-25 17:13:08

oracle分組函數(shù)

2010-10-25 09:39:43

Oracle FBI索

2010-10-29 15:37:51

Oracle物理結(jié)構(gòu)

2010-11-15 10:40:58

Oracle啟動(dòng)參數(shù)

2010-11-15 13:20:06

Oracle恢復(fù)結(jié)構(gòu)

2010-10-28 13:20:50

ORACLE reso

2010-10-26 11:55:21

Oracle OS備份

2010-10-27 16:22:07

Oracle層次查詢

2010-10-09 14:00:10

mysql CONCA

2010-11-16 14:59:39

Oracle顯式游標(biāo)

2010-10-27 14:27:13

oracle查詢語句日

2010-10-25 11:51:05

Oracle單行字符串

2010-10-27 14:57:24

Oracle查詢

2010-10-29 10:56:46

ORACLE用戶驗(yàn)證

2010-10-25 16:29:45

Oracle隨機(jī)數(shù)產(chǎn)生

2010-10-26 11:28:33

ORACLE運(yùn)行方式

2010-10-28 10:19:29

oracle權(quán)限管理

2010-10-29 14:57:12

Oracle歸檔模式

2010-10-27 15:58:01

Oracle臨時(shí)表
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)