MySQL Forums
Forum List  »  Newbie

Re: Error: Not the correct way to delete records.
Posted by: Phillip Ward
Date: November 08, 2022 05:14AM

You don't say which client tool you're using to write this statement.

Is there anything else before this in the "editor"?
If there is, then the tool might be trying to read the DELETE as a keyword to the preceding command, rather than a statement in its own right.

SELECT * 
FROM MyTable    <-- No semicolon to end the select
 
DELETE          <-- Delete doesn't "go" on the end of a "select". ERROR
FROM MyTable ...

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
Re: Error: Not the correct way to delete records.
November 08, 2022 05:14AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.