()-- Dateadd (date part, value to be added, date): add the corresponding value according to the specified date part.Select dateadd (mm, 2, '2014/1/1') -- display 2013/2Select dateadd (YY,-2, '2014/1 ') -- display 2013/2-- Datediff (date part, date 1, date 2): Calculate the gap between two dates based on the date part (I .e., date 2-date 1)Select datediff (mm, '2014/1/1', '2014/3/5') -- display 5Select datediff (mm, '2014/1/5', '2014/3/1') -- show-5-- Datename (date part, date): obtains the
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 ZERO SPACE------------------------------------65 97 48 322. CHRReturns the corresponding characters;SQL> select chr (54740) zhao, chr (65) chr65 from dual;ZH C---Zhao3. CONCATConnect two strings;SQL> select concat ('010-', '000000') |' to 23' Gao Qian competin
Single record function in SQL 1. ASCII returns the decimal number corresponding to the specified character; SQLselectascii (A) A, ascii (a) a, ascii (0) zero, ascii () spacefromdual; The AAZEROSPACE------------------------------------659748322.CHR gives the integer, returns the corresponding character; SQLselect
Single record function in SQL 1. ASCII returns the decimal number corresponding to the specified character. SQL select ascii (A) A, ascii (a) a, ascii (0) zero, ascii () space from dual;
Oracle function Daquan (string function, mathematical function, date function,: 25sql single record function 1. ASCII returns 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---Zhao3. ConcatConnect two strings;SQL>
Functions in a database are similar to functions in C #sequentially,The price is special here.Print can be printed in the Message bar.Mathematical functionsCeiling () The upper limit does not care how big the decimal point is, directly ignoreFloor () lower limit ibid.Round (column name, number of reserved digits) rounding reserved decimals the last digit in the number of reserved digits is not enough for th
C string and string functions (1), c string functions
String is a very common data type in C language. Learning to master the string has a certain effect on understanding the pointer o
Common string operation functions in PHP development, and string functions in php Development
1. concatenate stringsConcatenating strings is one of the most common string operations. In PHP, You Can concatenate strings in three ways: Dots. separator {} operation, and dot equ
PHP-Based String operation functions and php string functions
1. Search for the character location function:
Strpos ($ str, search, [int]): // search for the first position of search in $ str starting from int; strrpos ($ str, search, [int]): // search for the last occurrence position of search in $ str starting from i
Label: 2 --Mathematical Functions
3 Select CEILING(COUNT(*)/5.0) fromNews--take the smallest integer greater than the result
4 Select Floor(COUNT(*)/5.0) fromNews--take the largest integer less than the result
5 Select SQRT(2)--Value Open Square
6 Select ROUND(3.45645,2)
7 Select ABS(-5): The absolute value function, which takes the absolute value of this number, can be applied to the addition and subtraction of some of the more chaotic values in the
ProductName
OrderDate
1
Computer
2008-12-26
2
Printer
2008-12-26
3
Electrograph
2008-11-12
4
Telephone
2008-10-19
Now, we want to select a record from the table above that OrderDate is "2008-12-26".We use the following SELECT statement:SELECT * from Orders WHERE orderdate= ' 2008-12-26 'Result set:
OrderId
ProductName
OrderDate
1
', title) from News--the query target content does not appear in the specified area and appears in the location of the Select REPLACE (Title, ' China ', ' us ') from news--the replacement string. Example searches for keywords and significantly selects STUFF (title,3,4, ' Chine ') from News 22 other functions of the 1 Select CEILING (RAND () *10)--randomly generated numbers between The range of random numbe
String library functions ----------- summarize some common string processing functions.
Header file: # include
First place
Char * strstr (char * dest, char * need );
Locate the position where the need string appears from the dest stri
Single-record functions in SQL 1. 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 ZERO SPACE------------------------------------65 97 48 322. CHRReturns the corresponding characters;SQL> select chr (54740) zhao, chr (65) chr65 from dual;ZH C---Zhao3. CONCATConnect two strings;SQL> select concat ('010-', '000000') |' to 23' Gao Qian competi
1. There are two string comparison functions, namely memcmp () and strcmp (),MEMCMP (const char *s,const char *d,int N)Indicates that the string s and D compare the first n characters, and if the character length is less than N, the comparison is out of bounds, so use this function with special care for S and d in length and the number of characters to compare.st
Unsignedlong number to a string char * ULTOA (long digit, char *deststr,int radix);"The above library functions can be used for binary conversions"Similar functions also include:Double Strtod (char *, char * *), long strtol (char *, char * *, int), unsigned long strtoul (char *, char * *, int);3. String manipulation f
like "% 20 # %" escape "#"+ String-connected charactersSelect au_laname + "," + au_fname from authors Mathematical functionsABS (numeric_expr)Returns the absolute value of a specified value.Ceiling (numeric_expr)Returns the smallest integer greater than or equal to the specified value.Exp (float_expr)Returns the specified exponential value.Floor (numeric_expr)Returns the maximum integer that is less than or equal to the specified value.Pi ()Returns a
C-language string processing functions, string functionsC language string processing function http://blog.csdn.net/ruizeng88/article/details/6677736
1. String comparison
Int strcmp (const char * s1, const char * s2 );
When comparing the sizes of two strings (case-insensitive
A collection of built-in string operation functions in PHP and a collection of php string functions1. Search for the character location function:
Strpos ($ str, search, [int]): // search for the first position of search in $ str starting from int; strrpos ($ str, search, [int]): // search for the last occurrence position of search in $ str starting from int2. Ext
value cannot exceed 2000 bytes;The returned vchar2 value cannot exceed 4000 bytes;If the length of the characters to be returned exceeds the upper limit, Oracle does not report an error but directly truncates it to the maximum supported length.
The length of the returned clob value cannot exceed 4 GB;For clob-type functions, if the returned value is too long, Oracle will not return any errors but directly throw an error.
1. Lower (c) converts the
String common functions, string functions
// Specify the character list to escape all characters in the listAddcslashes (string $ str, string $ charlist );Echo addcslashes ('foo [] ', 'a. Z ');// Output: \ f \ o \ [\]// Escape all
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.