diff --git a/database_maintenance/cycle_notification_history_in_batches.sql b/database_maintenance/cycle_notification_history_in_batches.sql index 82297434f..4dbd3fb9b 100644 --- a/database_maintenance/cycle_notification_history_in_batches.sql +++ b/database_maintenance/cycle_notification_history_in_batches.sql @@ -2,9 +2,7 @@ CREATE TABLE notification_history_pivot AS SELECT * from notification_history WHERE 1=2; -SELECT id -INTO nh_temp -FROM notification_history; +CREATE TEMPORARY TABLE nh_temp AS SELECT id FROM notification_history; SELECT COUNT(*) AS 'Total number of rows in nh' FROM nh_temp;