Table aliases are not supported when the MySQL database deletes data.

Source: Internet
Author: User

Table aliases are not supported when the MySQL database deletes data.

An error occurred while executing a deleted SQL statement.

The SQL statement is as follows:

Delete from LEAD_SYSTEM_MENU_ORG_REF as t WHERE t. resourceid = '4028812348f28b890148f29253a80000'

This SQL statement can be executed normally in the Oracle database, but the following error occurs when it is executed in the MySQL database:

[Err] 1064-You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where t. resourceid = 'hangzhou'

When you see "SQL syntax", you will know that the SQL Execution error is caused by incorrect SQL syntax. This is strange. This deleted SQL statement is normal and can be executed normally, why can't MySQL do this? I checked the reason online. It turns out that table aliases are not supported when I delete data in the MySQL database. I did not notice this problem before. I will record it here.

This article permanently updates the link address:

Related Article

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.