SQL single-line functions in Oracle databases-character FunctionsThis learning is about character functions.Character FunctionsCharacter functions can also be divided into case-insensitive conversion functions and character processing functions.Case-
MySQL function learning NOTE 2: character Functions
1. Calculate the number of characters and length of a string-CHAR_LENGTH (s)
CHAR_LENGTH (str): Returns the number of characters contained in str.
Mysql> select CHAR_LENGTH ('mysql ');
+ -----------
Here is a summary of several character functions in PHP, a summary:
1) Ucfirst
Capitalize the first letter, such as
$string = "This is my web development blog";
echo Ucfirst ($string);
Output:this is my web development blog
2) Lcfirst, lower
Function name
return value
Isalnum ()
If the argument is alphanumeric, that is, the letter or number, the function returns True
Isalpha ()
If the argument is a letter, the function returns True
Oracle date functions/character functions/numeric functions/conversion functions/Aggregate functions Oracle date functions: [SQL] MONTHS_BETWEEN: returns the difference of the month between two dates MONTHS_BETWEEN ('01-EP-95 ', '11-JAN-94 ') ==> 19.
2. Remove space functions 1. ltrim () Remove spaces in the string header. 2. rtrim () removes spaces at the end of the string. Iii. substring functions 1. leftstr () leftstr (, ) return STR with the characters integer_expression starting from the
Talking about the comparison between chr, unichr, and ord character functions in Python, unichrord
Ord is the abbreviation of unicode ordinal, that is, number.
Chr is the abbreviation of character, that is, the character
Ord and chr convert
-- SQL filters out spaces and other special character Functions
Crteate function DBO. getcodestring (@ sourcesql varchar (500 ))Returns nvarchar (500)
AsBeginDeclare @ I intDeclare @ validchar nvarchar (100)Declare @ temp nvarchar (500)Set @
Three kinds of Java remove duplicate character functions from strings*/
public static void Main (string[] args) {System.out.println (Removerepeatedchar ("DDDDCCFFGD"));}
public static string Removerepeatedchar (string s) {if (s = = null)return
1.UPPER and UCasereturns the string str, which changes all characters to uppercase based on the current character set mapping (the default is Iso-8859-1 Latin1). This function is reliable for multiple bytes. 2.LOWER and LCasereturns the string str,
Upper (String/column): Converts the input string to uppercase lower (string/column): Converts the input string to lowercase initcap (string/column): The first letter capitalized length (string/column): String lengths Replace (string/column,
-----------------------------------------------character function-----------------------------------------------1:asciiReturns the ASCII value of a string SELECT ASCII (' A ') from DUAL;SELECT ASCII (' a ') from DUAL;--2:chrReturns the ASCII
Main functions:
Uppercase and lowercase conversion functions
Get substring function (string intercept)
Get string length function
String Join function
Remove substring function
Character substitution functions
First,
First, give an example of the book "The_c_programming_language":#include int main () {int c;c = GetChar (); while (c! = EOF) {Putchar (); c = GetChar ();} return 0;}The main explanation here is why you should use the int type to accept the GetChar
mysql characters commonly used function introduction concat (S1,s2 ... Sn) Connection S1,s2 ... SN is a string concat function that joins the passed in parameter as a string. For example,: "AAA", "BBB", "CCC" 3
1 multi-line function (understanding: there are multiple inputs, but only one result is output) SQLselectcount (*) fromemp; COUNT (*) ----------- 14B character function LowerselectLower (Hello) to lowercase, convert upper (hello) to uppercase, and
Instance
Remove the characters to the left of the string:
"; Echo LTrim ($str, "Hello"); >
Definition and usage
The LTrim () function removes white space characters or other predefined characters to the left of the string.
Related functions:
RTrim ()
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.