PLSQL single line function and group function detailed (3)

zhaozj2021-02-16  56

The single-line conversion function single-line conversion function is used to operate a multi-data type and converted between data types.

Chartorwid

)

c Make a string, the function converts C to the RWID data type.

Select Test_id from test_case where rowid = chartorwid ('aaaa0saacaaaaliaaaaa "): SELECT TEST_ID

CONVERT

,

[,

])

C tail strings, DSET, SSET are two character sets, and the function converts the string C by the SSET character set to the DSET character set, and the SSET's default setting is a character set of the database.

HEXTORAW

)

X is a 16-based string, and the function converts 16-entered X to the RAW data type.

Rawtohex (

)

X is the RAW data type string, and the function converts the RAW data class into a 16-based data type.

Rowidtochar (

)

The function converts the ROWID data type to a CHAR data type.

TO_CHAR

[

[,

)

X is a DATA or NUMBER data type, and the function converts X to the CHAR data type of FMT specified format, if X is the date nlsparm = nls_date_language controls the language returned and the language used in the dial. If x is digital NLSPARM = NLS_NUMERIC_CHARACTERS to specify a separate and minibitial separator, as well as currency symbols.

NLS_NUMERIC_CHARACTERS = "DG", NLS_CURRENCY = "String"

TO_DATE

[,

[,

)

c represents a string, and the FMT represents a string of special format. Returns the language that is displayed in the FMT format to represent the language used by NLSPARM. The function converts the string C into a DATE data type.

TO_MULTI_BYTE

)

c Represents a string, the function converts the burning of C to multiple byte characters.

TO_NUMBER

[,

[,

)

c represents a string, FMT represents a string of a special format, and the function return value is displayed in the format specified by the FMT. NLSPARM represents the language, the function will return the number of C.

TO_SINGLE_BYTE

)

Convert the string C to the multi-byte character to the equivalent single-byte character. This function is only used when the database character set contains both single bytes and multi-byte characters.

Other single line functions

BfileName

,

)

Dir is an object of a Directory type, file is a document name. The function returns an empty BFile location value indicator, and the function is used to initialize the BFile variable or a bfile column.

Decode

,

,

[,

,

, [

])

X is an expression, M1 is a matching expression, and the X is compared with M1. If M1 is equal to X, then returns R1, otherwise, X and M2 compare, secondly push M3, M4, M5 ... until there is a return result.

DUMP

, [,

[,

[,

]]]]])

X is an expression or character, and the FMT represents 8 credits, 10 encompasses, 16 envelopes, or single characters. The function returns a value of a VARCHAR2 type containing the internal representation of the X. If N1 is specified, N2 then the byte of the length from N1 is N2 will be returned.

EMPTY_BLOB ()

This function does not have a parameter, and the function returns an empty BLOB position indicator. The function is used to initialize a BLOB variable or a blob column.

EMPTY_CLOB ()

This function does not have a parameter, and the function returns an empty Clob position indicator. The function is used to initialize a CLOB variable or a Clob column.

Greatest

)

Exp_List is an expression that returns the largest expression, each expression is implicitly converted to the data type of the first expression, if the first expression is any one in the string data type, then The result of the returned is the VARCHAR2 data type, and the comparison of the use is a comparison of non-filled spaces. Least

)

Exp_List is an expression that returns to the smallest expression, each expression is implied, the first expression of the first expression, if the first expression is any of the string data type, will The result of the returned is the VARCHAR2 data type, and the comparison of the use is a comparison of non-filled spaces.

UID

This function does not have a parameter, and returns an integer that is uniquely launched by the current database user.

User

Returns the username of the current user

Userenv

)

The OPT returns to contain current session information. Opt options are:

Sysdba feet in the ISDBA session, returns true

SessionID Returns the audit session marker

EntryID Returns the available audit item marker

After instance returns an instance marker after the session is connected. This value is only used to run the Parallel server and have multiple instances.

Language returns the character set for language, region, database settings.

LANG returns an ISO abbreviation for language name.

Terminal returns the logger of the operating system for the terminal or computer used by the current session.

VSIZE

)

X is an expression. Returns the number of bytes indicated inside the X.

转载请注明原文地址:https://www.9cbs.com/read-17909.html

New Post(0)