Get the App
SLTechnology News&Howtos  ›  Database  › 

What are the string functions in Oracle

Shulou Source: shulou.com Published: 2022-05-31 21:20:52 09月28日 Update

What are the string functions in Oracle? in order to solve this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a simpler and easier way.

-

SQL > select greatest (111222) from dual

GREATEST (111222)

-

two hundred and twenty two

SQL > select least (111222) from dual

LEAST (111222)

-

one hundred and eleven

SQL > select floor (- 7.8) from dual

Select sys_guid () from dual

SYS_GUID ()

-

52E859DC8A9D0DA8E053FB6410AC9549

Insert into T1 values ('we')

Insert into T1 values ('me you')

Insert into T1 values ('you')

Insert into T1 values ('eat')

Insert into T1 values ('he')

> select * from T1 order by nlssort (name,'nls_sort=schinese_pinyin_m')

SQL > select systimestamp from dual

SQL > select vsize (ename) "byte" from emp where deptno=30

SQL > select ora_hash (ename) from emp

SQL > select extract (hour from sysdate) year from emp

SQL > select sign (3434) from dual

-

Regular expression

Regexp_count

Regexp_instr

Regexp_replace

Regexp_substr

Regexp_like

Regexp_like

SQL > select ename from emp where regexp_like (ename,'A | S')

SQL > select ename from emp where ename like'% A%'or ename like'% S%'

SQL > select ename from emp where regexp_like (ename,' ^ A')

SQL > select ename from emp where regexp_like (ename,'G$')

SQL > select ename from emp where regexp_like (ename,' ^ [Amurz] + $')

SQL > select ename from emp where regexp_like (ename,'s','c')

No rows selected

SQL > select ename from emp where regexp_like (ename,'S','i')

Regexp_replace

Selelect replace ('abc','a','d')

Select regexp_replace ('abcabc','a','0',1,2,'i') from dual

Regexp_instr

SELECT REGEXP_INSTR ('1234567890,' (123) (4 (56) (78) 0), 1, 1, 1, 1)

"REGEXP_INSTR" FROM DUAL

0123 ((abc) (de) f) ghi) 45 (678)

Abcdefghi abcdef abcde 678

((Hebei Province) (Xingtai) (Shahe))

Xingtai, Hebei Province

Xingtai version of Hebei Province

Shijiazhuang, Hebei Province

Regexp_substr

Select susbtr ('172.16.50.1,)

172.16.100.1

172.168.9.

172.16.100.2

SELECT

REGEXP_SUBSTR ('500 Oracle Parkway, Redwood Shores, CA'

', [^,] +,') "REGEXPR_SUBSTR"

FROM DUAL

^ [,]

[^,]

SELECT REGEXP_COUNT ('123123123123,' 123', 3,'i') COUNT FROM DUAL

DECODE

CASE

10 + 1000

20 + 1500

30 x

40-500

Sign

Sal

Tags: Functions Hebei characters questions Hebei Xingtai strings math more Chinese English help answers easy maximum minimum easy content boys buddies Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Linux Huawei MySQL OPPO Reno