/
Deletion of Log Data
Deletion of Log Data
Syntax
DELETE FROM table_name; DELETE FROM table_name OLDEST number ROWS; DELETE FROM table_name EXCEPT number ROWS; DELETE FROM table_name EXCEPT number [YEAR | MONTH | WEEK | DAY | HOUR | MINUTE | SECOND]; DELETE FROM table_name BEFORE datetime_expr;
Example
-- Delete all data. mach>DELETE FROM devices; 10 row(s) deleted. -- Delete oldest 5. mach>DELETE FROM devices OLDEST 5 ROWS; 10 row(s) deleted. -- Delete all except last 5. mach>DELETE FROM devices EXCEPT 5 ROWS; 15 row(s) deleted. -- Delete all data from before June 1, 2018. mach>DELETE FROM devices BEFORE TO_DATE('2018-06-01', 'YYYY-MM-DD'); 50 row(s) deleted.
Related content
Deletion of Log Data
Deletion of Log Data
More like this
Creating and Managing Log Table
Creating and Managing Log Table
More like this
Creating and Managing Log Table
Creating and Managing Log Table
More like this
Creating and Managing Log Table
Creating and Managing Log Table
More like this
Creating and Managing Log Table
Creating and Managing Log Table
More like this
Log Table
Log Table
More like this