DELETE FROM someTable
WHERE someValue = '123';
If we wished to DELETE FROM where there may be multiple results, then we can do;
DELETE FROM someTable
WHERE someValue IN ('123','432','884');
If we wanted to know how many lines would be deleted, we can do;
SELECT count(*) FROM someTable
WHERE someValue = '123';
and similarly, where there me be multiples;
SELECT count(*) FROM someTable
WHERE someValue IN ('123','432','884');
instead of counting, we can of course do (RECOMMENDED);
SELECT someValue) FROM someTable
WHERE someValue IN ('123','432','884');
No comments:
Post a Comment
Note: only a member of this blog may post a comment.