"Issues related to unmatched rows" in the MySQL database"

Source: Internet
Author: User

If a complex query of many tables is used, but no rows are returned, perform the following steps to identify the error:

Use EXPLAIN to test the query to check whether a clear error has been found. Select only the columns used in the where clause.

Delete one table once in the query until some rows are returned. If the table is large, it is better to use LIMIT 10 in the query.

For columns with rows that match the table deleted from the last query, a SELECT query is sent.

If you compare FLOAT or DOUBLE columns with numeric values, you cannot use equality (=) for comparison. This problem is common in most computer languages because not all floating point values can be saved with accurate precision. In some cases, changing FLOAT to DOUBLE can correct this problem. See section A.5.8, "Issues related to floating point comparison ".

If you still cannot find out the problem, create a mysql test query. SQL dump table that can match the problem to create a test file. Open the file in the editor, delete some inserted rows (if there are rows beyond the required for demonstration), and add the SELECT statement at the end of the file.

Run the following command to verify that the test file demonstrates the problem:

Shell> mysqladmin create test2

Shell> mysql test2 <query. SQL

Use mysqlbug to post the test file to the Yona universal MySQL mail list.

 

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.