Вопрос по mysql – Неизвестная таблица в MULTI DELETE

11

Этот запрос дает мне ошибку в MySQL 5.1.57, хотя работает в 5.1.53:


    DELETE f
    FROM table1 AS f
    JOIN table2 AS dsy
    JOIN table3 AS ds
    JOIN table4 AS dp
    JOIN table5 AS dg
    WHERE
    dsy.f1 = f.f1
    AND ds.f2 = f.f2
    AND dp.f3 = f.f3
    AND dg.f4 = f.f4
    AND dsy.school_year = 2011
    AND ds.id = 29620
    AND dp.id = 14120
    AND dg.grade_level = 5;

Ошибка: Неизвестная таблица «f»; в MULTI DELETE

Спасибо!

РЕДАКТИРОВАТЬ: На самом деле этот запрос работает, дело в том, что я использовал имя схемы для объявления своих таблиц, таких как schema.table1 (я удалил его, чтобы опубликовать более понятный запрос), с именем схемы, которое разрывается ...

Error: User Rate Limit ExceededDELETE db1.a FROM db1.table1 a JOIN db2.table2 b LEFT JOIN ... Matthieu
Error: User Rate Limit Exceeded Maxime Laval
Error: User Rate Limit Exceededbugs.mysql.com/bug.php?id=27525Error: User Rate Limit Exceeded Marvo
Error: User Rate Limit Exceeded Matthieu

Ваш Ответ

3   ответа
3

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

DELETE table1
    FROM table1 
    JOIN table2 
    JOIN table3 
    JOIN table4 
    JOIN table5 
    WHERE
    table2.f1 = table1 .f1
    AND table3.f2 = table1.f2
    AND table4.f3 = table1.f3
    AND table5.f4 = table1.f4
    AND table2.school_year = 2011
    AND table3.id = 29620
    AND table4.id = 14120
    AND table5.grade_level = 5;
Error: User Rate Limit ExceededDELETEError: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
15

Error: User Rate Limit Exceeded

DELETE f
FROM table1 AS f
JOIN table2 AS dsy
  ON dsy.f1 = f.f1
JOIN table3 AS ds
  ON ds.f2 = f.f2
JOIN table4 AS dp
  ON dp.f3 = f.f3
JOIN table5 AS dg
  ON dg.f4 = f.f4
WHERE
  dsy.school_year = 2011 AND ds.id = 29620 AND dp.id = 14120 AND dg.grade_level = 5;
Error: User Rate Limit Exceededdev.mysql.com/doc/refman/5.5/en/delete.html
Error: User Rate Limit Exceeded Maxime Laval
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded Maxime Laval
1

Error: User Rate Limit Exceeded

DELETE **`schemaX`.f**
    FROM `schemaX`.table1 AS f
    JOIN table2 AS dsy
    JOIN table3 AS ds
    JOIN table4 AS dp
    JOIN table5 AS dg
    WHERE
    dsy.f1 = f.f1
    AND ds.f2 = f.f2
    AND dp.f3 = f.f3
    AND dg.f4 = f.f4
    AND dsy.school_year = 2011
    AND ds.id = 29620
    AND dp.id = 14120
    AND dg.grade_level = 5;

Похожие вопросы