MySQL Error summary and from_unixtime usage

Source: Internet
Author: User

There was an error pouring into the database to import the. sql file today. Look at the error code:

You have a error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use-near ' order ' on line 1

First look at the table on the order table regardless of any operation to delete the modified query is a direct error. Deleting a table is also.  But it's OK to check the other tables for any operation. Finally found. It turns out that this error was the Order keyword conflict in the table name order and the MySQL statement

All you have to do is change the table name.  The operation is in progress. If you don't want to change the name, you can add "order" or select COUNT (*) from ' order ' on both sides of the order at the time of operation.

In addition to the explanation under another function MySQL in the oneself used to hey

From_unixtime

Effect: Displays the time in MySQL as an int (11) in the "YYYY-MM-DD" format.

No nonsense look at the example:

Let's not look at the results directly from the SQL statement. is not an instant to understand the use of from_unixtime.

MySQL Error summary and from_unixtime usage

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.