Create a recursive stored procedure in Mysql

Step 1: SET max_sp_recursion_depth = 12; Step 2: CREATE createChildDept process SQL code www.2cto.com DELIMITER $ USE 'zhiku '$ DROP PROCEDURE IF EXISTS 'createchilddept' $ CREATE DEFINER = 'root' @ '% 'Procedure 'createchilddept' (IN rootId INT, IN

Mysql-proxy read_query method implements post-Authentication connection after executing special SQL statements

The mysql-proxy read_query method implements authentication connection after special SQL is executed. In mysql-proxy, you can set session variables, this function allows you to perform Secondary authentication by executing the specified SQL

Mysql uses the stored procedure to achieve a split-like effect.

Mysql uses the stored procedure to achieve the effect similar to split. Foreground: the keywords in the database are separated by ";", and the query result set is sorted in descending order according to the number of keyword frames, and display it

Interesting questions about MySQL limit and order

MySQL limit and order by have interesting problems. I believe everyone knows that MySQL's limit syntax select/delete/update... limit start, len; Is to query or update several pieces of data. Of course, we need to know that if there are limit update

Mysql randomly queries several data entries

Mysql randomly queries several pieces of data. In mysql, You can query five non-Duplicate pieces of data BY using the following: SELECT * FROM 'table' order by rand () LIMIT 5. However, the test results show that the efficiency is very low. It takes

Differences between Delete/truncate/drop

Delete/truncate/drop differences 1. delete/truncate only deletes data, does not Delete the table, the index structure. Drop will delete the table structure and the index/constrain/trigger that depends on the table. The procedure/function will be

Query of table space and indexes in the mysql table structure

Mysql table structure table space and index query 1. query table structure information SQL code desc tableName; show columns from tableName; describe tableName the results returned above are the same. 2. query the column information of the table.

A test question about mysql update

A mysql test question about update I went to the interview some time ago and saw a test Question: The TABLE creation statement is: CREATE table · test _ TABLE '{id int (5) unsigned NOT NULL AUTO_INCREMENT, a int (1) not null, B int (1) not null

Mysql My. ini

Mysql My. ini detailed description of client section: [client] port = 3306 Port = 3306 [mysql] default-character-set = latin1 default character encoding = latin1 server section Server chapter [mysqld] # The TCP/IP port the MySQL SERVER will listen

SQL Mode and related issues

SQL Mode and related issues 1. Introduction to Mysql SQL Mode the MySQL server can work in different SQL modes and apply these modes to different clients in different ways. In this way, applications can customize server operations to meet their own

MySQL DATE_ADD () function

MySQL DATE_ADD () function I always think that the DATE_ADD () function is unreasonable and misleading others, because it is not only about the increase of dates, but also I often use it for subtraction. Is it better to change to DATE_CHANGE? :)

How to remotely clean up expired backups on 48 MySQL DB servers in Production

How can I remotely clean up expired and expired backups on 48 MySQL DB servers in Production? How can I remotely clean up expired and effective backups on 48 MySQL DB servers! At first, I thought of entering ssh from the control machine one by one,

Sp_object MYSQL obtains the content of the specified object and Definition Statement in the current instance.

Sp_object MYSQL obtains the content of the specified object and Definition Statement in the current instance [SQL] DELIMITER $ USE 'test' $ DROP PROCEDURE IF EXISTS 'SP _ object' $ CREATE PROCEDURE 'SP _ object '(p_OBJECTNAME VARCHAR (255 ),

MYSQL each user obtains one record in three ways (group by xxx)

In MYSQL, each user reads one record in three ways (group by xxx) and asks me about the SQL statements in this regard. I remember it specially, after all, this is also quite common [SQL] select * from (select * from member_payment order by id desc)

SQL optimization: Association of two tables in millions, from 40 minutes to 3 seconds

SQL optimization: Join two tables of millions. The process from 40 minutes to 3 seconds [SQL] the table structure is as follows: [SQL] CREATE TABLE 'deviceback' ('id' int (11) NOT NULL AUTO_INCREMENT, 'imei' varchar (100) NOT NULL comment' unique

Mysql master-slave synchronous backup

The mysql master-slave synchronous backup website has a background service called the searchEngine project, which is built based on Lucene. It mainly provides index building and retrieval functions. The search engine queries the mysql database and

Simple configuration of Mysql database read/write splitting

Simple configuration environment for Mysql database read/write Splitting: Master:192.168.71.128 mysql-sql-node1Slave:192.168.71.140 mysql-data-node1Mysql-Proxy:192.168.71.138 mysql-mgm-noderpm -q libevent glib2 pkgconfig libtool

User and password generation management in mysql

The user and password generation management application in mysql is launched, involving user name and password management. As the application is launched, managing user names and passwords becomes a problem. We also need to grant permissions to

Ubuntu Server uses the automysqlbackup script

Ubuntu Server used the automysqlbackup script. The Server was accidentally shut down yesterday, causing damage to the database file in the development environment. So I remembered the automatic backup task. I originally planned to write a script

Log_bin_trust_function_creators error Solution

Log_bin_trust_function_creators error solution when mysql establishes a function locally or remotely or procedure, the preceding error is reported. The test result is that the value of log_bin_trust_function_creators is off: Set global

Total Pages: 3233 1 .... 3140 3141 3142 3143 3144 .... 3233 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.