[MDEV-7633] Delete .... not exists Created: 2015-02-25 Updated: 2015-02-26 Resolved: 2015-02-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Delete |
| Affects Version/s: | 10.0.16-galera |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Blocker |
| Reporter: | hervé | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
debian 7 |
||
| Description |
|
Error column e.room_id is unknown |
| Comments |
| Comment by Elena Stepanova [ 2015-02-25 ] | |||||||||||
|
There are several problems with your example. First, the DELETE query as is ends with a syntax error:
This is because you use multi-table syntax, but only partially. Apparently, you meant something like:
It also fails, on the obvious reason:
So, in fact it should be this:
Now, it indeed fails with
There are two reasons for that. First, you are mixing up lowercase and uppercase alias names. Since you are on Wheezy, I assume you are running with case-sensitive table names, so you shouldn't do mix them. Instead, it should be like this:
But it still fails with the same error. Now we probably got to the problem which your report is actually about. ON clause can only refer to the operands in the JOIN, which `employee` is not. See http://dev.mysql.com/doc/refman/5.6/en/join.html – it's a long article, but it does actually say so, search for "can refer only".
| |||||||||||
| Comment by hervé [ 2015-02-26 ] | |||||||||||
|
sorry for the late reply yes, I was wrong about the capital.
When i execute this syntax delete .... it is bad
| |||||||||||
| Comment by Elena Stepanova [ 2015-02-26 ] | |||||||||||
Please execute and paste the output from your client. The whole output, starting from the query and ending with the line "empty set". | |||||||||||
| Comment by hervé [ 2015-02-26 ] | |||||||||||
|
ok, but too later |