]
Is the millisecond, if not the number is the default precision.
Can only be used with timestamp types.
16
Fm
One of the notable functions: no content is returned.
I'm not sure why Oracle set this thing up.
17
Fx
Ditto
18
HH
Represents hours, 12-hour, with Hh12 (1-12)
Character function--return character valueThese functions all receive parameters of the character family type (except CHR) and return the character value. In addition to the special instructions, most of these functions return a numeric value of type VARCHAR2. The return type of a character function is subject to the same restrictions as the base database type, such as: The VARCHAR2 value is limited to 2000
:hextorawConverts a hexadecimal-composed string to RawSELECT Hextoraw (' 324 ') from DUAL;
--9:rawtohexConverts the raw class numeric rawvalue to a corresponding hexadecimal-represented string. Each byte in the RawValue is converted to a two-byte string. Rawtohex and Hextoraw are two opposite functions.
SELECT Rawtohex (' one ') from DUAL;
--10:to_multi_byteConverts a single-byte character in a string to a multibyte characterConverts the specified cha
Tags: Oracle database character function math functionin the Oracle In the development and use, often need to use a variety of functions, this chapter summed up the simple string, mathematical functions, the need to use it later also convenient point, but also to make the students less go a little detour. -- characters
Userenv in Oracle ()
Oracle Userenv functions, Sys_context
Get session ID with Userenv, then connect v$transaction connection v$session, check current transaction number with session ID
Select T.xid from V$transaction t join v$session s on t.addr = s.taddr where s.sid = Userenv (' Sid ')
1, USERENV (OPTION)Returns the current session information.Option= ' Is
What is an analytic function?Analytic functions are powerful functions that Oracle specifically uses to address the statistical requirements of complex reports, which can be grouped in data and then calculated based on some statistical values of groups, and each row of each
Common Oracle functions-character and mathematical functions
Various functions are often used in the development and use of oracle. This chapter summarizes simple strings and mathematical functions, which will be convenient to use
In Oracle functions in addition to character functions, date functions, mathematical functions, and conversion functions, and so on, there are some functions are common
representing the specified date part of the specified date.---- Syntax-- DATENAME (datepart, date)-- Abbreviation of date-- Year yy, yyyy-- Quarter qq, q-- Month mm, m-- Dayofyear dy, y-- Day dd, d-- Week wk, ww-- Hour hh-- Minute mi, n-- Second ss, s-- Millisecond MSSelect datename (year, getdate () + 'Year' + DATENAME (month, getdate () + 'month' AS 'monthname'
Oracle date functions
Description of date f
') from DUAL; --17:NVL (X, VALUE)Returns value if X is null, otherwise returns X SELECT NVL (NULL, ' 2 ') from DUAL; SELECT NVL (' + ', ' 2 ') from DUAL; --18:NVL2 (X, VALUE1, VALUE2)If x is a null value, return VALUE1, otherwise return VALUE2 SELECT NVL2 (NULL, ' 3 ', ' 4 ') from DUAL; --19:nanvi (X, VALUE)Returns value if X is not a number, otherwise returns x SELECT nanvi (' 3DF ', ' a ') from DUAL; --I don't know if it appears in Oracle 11.------
------------------------------------------type conversion function------------------------------------------------Automatic type conversion, ORACLE can automatically change the following according to the specific situation:* String to Numeric* String to date* Value to String* Date to StringEX:--* string to numericSELECT ' 3.14159 ' + from DUAL;SELECT ' 3.1T ' + from DUAL; --Error: Invalid number, that is, the string must be able to be converted to a n
Single-record functions in SQL1. ASCIIReturns the decimal number corresponding to the specified character;SQL> select ASCII ('A') A, ASCII ('A') A, ASCII ('0') zero, ASCII ('') space from dual;
A A zero space------------------------------------65 97 48 32
2. CHRReturns the corresponding characters;SQL> select CHR (54740) Zhao, CHR (65) chr65 from dual;
Zh C---Zhao
3. ConcatConnect two strings;SQL> select Concat ('010-', '000000') |' to 23' Gao Qian co
],c3]) "function" converts a string X to a numeric type "parameter" c2,c3, character type, reference To_char () "Return" number string "reverse" to_char (DATE[[,C2],C3]) "Example" SelectTo_number ('199912'), To_number ('450.05') fromdual; To_multi_byte (C1) "function" converts half-width in a string to full-width "parameter" C1, character "return" string "Example" SQL>SelectTo_multi_byte ('High A') text fromdual; test--High A To_single_byte (C1) "function" converts full-width in string to half-w
Oracle notes some system functions, user-defined functions, and keyword inscriptions: Collect oracle knowledge points that are commonly used at work, update constantly, and accumulate constantly. Just use it as your own notebook. Some keywords 1 is not null to determine whether the field IS NULL[SQL] select * from t_us
Mathematical functions of Oracle SQL functionsABS (x) "function" returns the absolute value of x "parameter" x, numeric Expression "return" numeric SQL> SELECT ABS ( -), ABS (- -) from DUAL; ABS ( -) ABS (- -)---------- ---------- - -Sign (x) "function" returns the positive negative value of X "parameter" x, numeric Expression "return" number, if positive value returns 1, negative value returns-1, 0
Oracle Database SQL single-row functions-date functionsPrefaceThe date functions of the Oracle database are very powerful and relatively large. I will sort it out for future reference.. Convenience for yourself and convenience for others!Common date functions1. Sysdate: current date and time [SQL]Select Sysdate from du
Oracle pl/SQL common functions, oracleplsql Functions
On csdn, I also saw a post called Oracle common function 110. after a rough look, there are many data calculations, such as covariance. I don't think I have used much. I can see it today, but it is not very comprehensive. I have added it a little. I can check it lat
Label:Analytic functions are new types of functions that are introduced in the 9i version of the Oracle database and are continuously enhanced in later versions. Analytic functions provide the ability to aggregate reference values across rows and levels. The effects of
, distinct means only the standard deviation for different values SELECT STDDEV (SAL) from SCOTT. EMP; SELECT STDDEV (DISTINCT SAL) from SCOTT. EMP; --5:variance (distinct| All) Covariance all means that all values are covariance, distinct means that only different values are evaluated for covariance SELECT VARIANCE (SAL) from SCOTT. EMP; SELECT VARIANCE (DISTINCT SAL) from SCOTT. EMP; --6:sum (distinct| All) Sum all means summing all values, distinct means summing only different values (t
Welcome to the Oracle community forum and interact with 2 million technical staff to access single-line string functions for operating string data. Most of them have one or more parameters, and most of them return string ascii () c1 is a string and returns the ascii code of the first letter of c1. Its Inverse Function is chr () selectascii (a) big_a, ascii (
Welcome to the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.