Answers for "how to empty the table in sql"

SQL
4

sql empty table

-- Quick, no possible rollback
TRUNCATE TABLE my_table;
-- With possible rollback
DELETE FROM my_table;
COMMIT;  -- or ROLLBACK;
Posted by: Guest on February-27-2021
5

sql delete where in

-- Deletes all records where `columnName` matches the values in brackets.
DELETE FROM tableName WHERE columnName IN ('val1', 'val2', 'val3');
Posted by: Guest on February-20-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language