удаление строк из таблицы Oracle
Добавлено: 2023-06-23 18:34:53
Всем, привет.
Подскажите пожалуйста где ошибка.
По выборке пытаюсь удалить 10000 строк.
Ошибка ORA-00933 не верное значение SQL - Предложения
Подскажите пожалуйста где ошибка.
По выборке пытаюсь удалить 10000 строк.



Код: Выделить всё
delete
from custemp c
where c.date between to_date('01.01.2000', 'dd.mm.yyyy') and
to_date('01.03.2010', 'dd.mm.yyyy')
and rownum <= 10000
order by c.date
DELETE Statement
If you’re getting the “ORA-00933 sql command not properly ended” on DELETE, then your query might look like this:
The error appears because the ORDER BY does not belong in a DELETE statement. The ORDER BY is only for ordering data returned by a SELECT statement, and serves no purpose in a DELETE statement.
So, change your query to remove the ORDER BY clause: