MySQLstored procedure error debug recordThe company platform runs on MySQL database, some stored procedures error, debugging process pain, record errors and solutions, for reference. Debug Environment:dbforge Studio for MySQL 6.1 version, trial
There was a problem with MySQL full-text retrieval during the development process, and the SQL statements printed by the console were executed in the database and the results were incorrect. Later found that the original is less double quotation
According to the introduction of Baidu Encyclopedia: Stored Procedure (Stored Procedure) is in a large database system, a set of SQL statements to complete a specific function, compiled and stored in the database, the user by specifying the name of
Noun:Inner Connection: Natural connection, only two matching rows can be displayed in the result setOuter connection: Left outer connection, right connection, full outer connectionInner JOIN, only columns that satisfy the WHERE condition are
The usual SQL statement for the purpose of counting a table is:Select Count (* from tableName; #or Select Count (1 from tablename;#or statistics A column item, such as IDSelectcount (ID)In addition, the number of statistics can be
For a long time did not start MySQL, today a start on 1067, thought My.ini configuration wrong, and then surf the internet to see the next My.ini after comparison found no problem.Just go to see Log,log in this directory: C:/programdata/mysql/mysql
Definition and usageThe Date_sub () function subtracts the specified time interval from the date.GrammarDate_sub (Date,interval expr type) The date parameter is a valid day expression. The expr parameter is the time interval that you want to add.The
Definition and usageThe Curdate () function returns the current date.GrammarCurdate ()Example 1Here is the SELECT statement:SELECT now (), Curdate (), Curtime ()The results are similar:
Now
()
curdate ()
curtime ()
$sql = "SELECT * FROM table_name where field_name like '% $var% '";$result =mysql_query ($sql) or die;MySQL provides standard SQL pattern matching and an extended regular expression based on Unix-like utilities such as VI, grep, and
In MySQL, use the RegExp keyword to match the query regular expression, which has the following basic form:Field name REGEXP ' Match method 'Pattern character meaning Use example
^ Match start SELECT ' books ' from ' Tb_name ' WHERE ' books '
The usual SQL statement for the purpose of counting a table is:Select Count(*) fromTableName;#orSelect Count(1) fromtablename;#orstatistics A column item, such as IDSelect Count(ID)In addition, the number of statistics can be information_schema by
Tags: mysql knowledge points SummaryNOTES: ZhengStart Note time:2014-08-27Scheduled completion: 2014-09-07Upload blog time:2014-09-08-------------------------Outline:First, install the MySQL service [completed]Ii. deploying MySQL Master-slave
MySQL changes table Storage EngineMySQL provides multiple database storage engines that store and extract data from MySQL databases. Different storage engines have different features. Sometimes you may need to convert an existing table storage
Mysql full-text search matching
During the development process, I encountered a problem about mysql full-text retrieval. The SQL statements printed on the console were executed in the database and the results were incorrect. Later, we found that
Solution to garbled data during MySQL Import and Export
Chinese characters are often garbled during mysql Data Import and Export, most of which are caused by inconsistent encoding settings during class import and export. This article describes the
How does mysql count the number of entries in a table?
The following is a common SQL statement used to count the entries in a table:
Select count (*) from tableName; # orselect count (1) from tableName; # or counts a column, such as IDselect count
How to Use select to query records that contain strings separated by commas in a field in MYSQL
First, create a string separated by commas. Create table test (id int (6) not null AUTO_INCREMENT, primary key (id), pname VARCHAR (20) not null, pnum
[MySQL] --) query the process of solving the cross-year problem among colleagues who celebrate their birthdays within five days.Preface:Ask a friend:SELECT * FROM ali_users where datediff (CAST (CONCAT (DATE_FORMAT (NOW (), '% y'), DATE_FORMAT
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