The oracle function is a PL/SQL subroutine. It is stored in the Oracle database as a database object. It will process the parameters passed in and return a processing result, that is, return a value. It is usually used to return a specific Data, oracle functions can be divided into two categories: system functions and user-defined functions.
The operating environment of this tutorial: Windows 10 system, Oracle version 19c, Dell G3 computer.
Definition of Oracle function
Function is stored in the oracle database as a database object, and the function is also called a PL/SQL subroutine.
The function will process the parameters passed in and return a processing result, that is, return a value. Usually used to return specific data.
Oracle functions can be divided into two categories: system functions and user-defined functions.
ORACLE function single-line function
- Does not change the real data, only further modifies or processes the data for display
- Can be mixed with fields Use
pseudo table: a real table that exists temporarily to facilitate data verification; table name: dual
1. Character function
Function name | Function | Example | Result |
---|---|---|---|
Capitalize the first letter | initcap('nice') | Nice | |
Convert to lowercase | lower('NICE') | nice | |
Convert to uppercase | upper('nice') | NICE | |
left shear | ltrim( 'nice','ni') | ce | |
Right cut | rtrim(' nice','e') | nic | ##concat(char1,char2) |
concat(' ni','ce') | nice | substr(char,pos,len) | |
substr ('nice',2,2) | ic | instr(char,substr) | |
instr('nice','c') | 3 | ##translate(char,key,value) | |
translate('nice','ne','01') | 0ic1 | ##replace(char,old,new) | String replacement |
nicce | 2. Numerical function |
Function name
Result | ##abs(n) | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | ##mod( m,n) | Module | mod(3,2) | ||||||||||||||||||||||||||||||||||||||||||
sign(n) | Get the sign | sign(-3) | |||||||||||||||||||||||||||||||||||||||||||
ceil(n) | Round up | ceil(3.2) | |||||||||||||||||||||||||||||||||||||||||||
floor(n) | Round down | floor( 3.2) | |||||||||||||||||||||||||||||||||||||||||||
##round(m,n) | Round to the specified number of decimal places | round(3.236,2 ) | |||||||||||||||||||||||||||||||||||||||||||
power(m,n) | m to the nth power | power(3,2) | |||||||||||||||||||||||||||||||||||||||||||
sqrt(n) | square root | sqrt(4) | |||||||||||||||||||||||||||||||||||||||||||
trunc(m,n) | Truncation | trunc(3.233,2) | |||||||||||||||||||||||||||||||||||||||||||
sin(n) | sine | sin(0) | |||||||||||||||||||||||||||||||||||||||||||
cos(n) | cosine | cos(0) | |||||||||||||||||||||||||||||||||||||||||||
3.Date function
Note:
Oracle function multi-row function
Oracle function conversion function
Other functions of oracle functions
|
The above is the detailed content of what is oracle function. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.
