Akina, посмотрю процедуру, тут вот http://on-line-teaching.com/sql/sql16.htm написано что можно без процедуры вложный поставить...
а в процедуре можно манипулировать с одной таблицей?
| Цитата |
* Incorrectly used table in subquery:
Error 1093 (ER_UPDATE_TABLE_USED) SQLSTATE = HY000 Message = "You can't specify target table 'x' for update in FROM clause"
This error will occur in cases like this:
UPDATE t1 SET column2 = (SELECT MAX(column1) FROM t1);
It's okay to use a subquery for assignment within an UPDATE statement, since subqueries are legal in UPDATE and DELETE statements as well as in SELECT statements. However, you cannot use the same table, in this case table t1, for both the subquery's FROM clause and the update target.
Usually, failure of a subquery causes the entire statement to fail.
|
|