The main purpose of writing this is to record a little bit of MySQL basic use, of course, SQL query statement has a lot of things, here is not introduced, this site has a detailed tutorial (http://www.sdau.edu.cn/support/mysq_doc/manual
Today make a judgment insert used in MySQL on DUPLICATE KEY UPDATE, now Mark below!You can choose on DUPLICATE KEY Update if you want to insert the data and update the data if you do not have the data in the database.The on DUPLICATE key update can
After installing the MySQL database, directly under the installation of the directory/usr/local/mysql under the new directory of data for storage, after the establishment, directly to start the database, found that can not start, the following error
--linux under MySQL installation and configuration---------------------------2014/05/18Configuration and installation of MySQL under LinuxThis article is installed with rpm Package Installation1. first download on official
background: ZABBIX(Centos 6.2 X64) Monitoring server in the installation of poor planning, the root partition is not large enough only 33G, the utilization has reached 98% , after use #du –sm The reason for the check is that the ibdata1 under mysql
-------------------------------------MyEclipse shortcut key 1 (CTRL)-------------------------------------Ctrl+1 Quick FixCtrl+d: Delete When moving forwardCtrl+q positioning to the last edited placeCtrl+l positioning in a rowCtrl+o Quick Display
1. Integral type
MySQL data type
Meaning (Signed)
tinyint (m)
1 byte range ( -128~127)
smallint (m)
2 byte range ( -32768~32767)
Mediumint (M)
3 byte range ( -8388608~83
1. Why can I set it to multiple redo log? (Innodb_log_files_in_group, the default value and the recommended value are 2, we set the line of unity is 4);2. What conditions will trigger the brush dirty? In addition to master_thread\ mandatory
Transfer 2.3 Released,This release is in addition to upgrading the based version* Optimize the synchronization performance of index-free tables* Optimized memory consumption of large transactions in slave mode*transfer mode-related function changes
Mathematical functionsAbsolute ABS ()Pi ()Square root sqrt ()Modulo to remove the remainder mod (dividend, divisor)Random number rand ()Rounding Round (number)Second party POW (5,2)E is the bottom exponent function exp (number)String functionsLength
We often encounter, when deleting a record of the database, the original ID sort will have an interval, such as the deletion of the data ID 8, the table ID sort from 7 directly to 9,So how do we solve this problem of re-arranging the ID?Just three
InnoDB Index Concept Summary record InnoDB index concepts for viewing INNODB index classification: Clustered index (clustered index) 1) When a primary key is available, a clustered index is created from the primary key 2) when there is
Most databases provide window functions, such as Rank,row_number, and so on. MySQL does not provide direct, but can be disguised in the realization, I previously wrote the implementation of Row_number, today there is time to put the implementation
Define a stored procedure, use a cursor, take a value from one table, and insert it into another table.drop procedure if exists search_test;CREATE PROCEDURE search_test (in ID int,out out_min_id varchar (200))BeginDeclare finished boolean default
We all know that com_insert and other com_xxx parameters can be used to monitor the access volume of database instances, which is what we often call QPS. Based on the MySQL replication principle, all operations performed by the master database are
Mysql Stored Procedure in END compound statement usage example
Begin_label:] BEGIN
[Statement_list]
END [end_label]
You can use the in... END compound statement to store subprograms to contain multiple statements. Statement_list indicates 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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service