"MySQL must Know"Structured Querylanguage,mysql is a database system management software software that can also be understood as a database server. Pronunciation, my Sequel,/?si?kw?l/see kuo1th. Chapter 2.3schema, outline, column. Row rows
The knowledge of MySQL must be
Command line start mysql:mysql-u user name-p password
Show column details in the table: Show Columns form tablename equivalent to DESC tablename
View all Show commands: Help show
No sorting is used when
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 322.CHR gives an
MySQL automatically transforms numbers into strings when necessary, and vice versa:Mysql> Select 1+ "1"; -2 mysql> SELECT CONCAT (2, ' test '); ' 2 test 'If you want to explicitly transform a number into a string, pass it as an argument CONCAT() .If
This article is not ready to introduce all of the Oracle functions, in the current situation, I do not have this time, need to learn too much, to spend most of the time on learning to use the technical aspects:), so if you are ready to learn all the
Reprint: http://www.feiesoft.com/00012/
ABS (X)
ABS (x) returns the absolute value of x.Abs (x) returns null if X is null.Abs (x) return 0.0 if X is a string or blob of that cannot being converted to a numeric value. If X is the
String functionsASCII (str)Returns the ASCII value of the first character of the string str (str is empty when the string returns 0)Mysql> Select ASCII (' 2 ');50Mysql> Select ASCII (2);50Mysql> Select ASCII (' dete ');100ORD (str)If the string str
Outline1. Functions2. Text Processing function3. Numerical calculation function4. Date processing function5. Aggregation function1. FunctionsFunctions are useful, but not universal:650) this.width=650; "src="
/* String function (PS. Index is calculated starting from 1) *//* Specify the character (or string) A, String B, and start index. Get the index value of a in B. */Select Charindex (' d ', ' ABCDEFG ', 0)--4Select Charindex (' BC ', ' ABCDEFG ', 0)--2
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. CHR
Give an
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. CHR
Give an integer and
Feel that some netizens always put forward some very basic questions, for example, there is no function to achieve such functions ah, what is the function of Ah, what the format is, and so on, but also feel their understanding of the lack of Oracle
Single-record functions 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;
A A ZERO space
--------- --------- --------- ---
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. CHR gives the
MySQL string intercept function: Left (), right (), substring (), Substring_index (). There is also mid (), substr (). where mid (), substr () is equivalent to the substring () function, the function of substring () is very powerful and flexible.1.
1.SQL can also use functions to process data, functions are generally performed on the data, for the conversion and processing of data to provide convenience. But each database management system (DBMS) has a specific function, in fact, only a few
This article is not ready to introduce all of the Oracle functions, in the current situation, I do not have this time, need to learn too much, to spend most of the time on learning to use the technical aspects:), so if you are ready to learn all the
Welcome to the Linux community forum, and interact with 2 million technical staff to enter the common text processing function Left () returns the Length of the string to the Left of the string () return the Length of the string Locate () find a
Character functions used by stored procedures to process strings -- return character values all functions receive family-type parameters (except for CHR) and return character values. except for some special descriptions, most of these functions
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
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.