You now hold all three great commands. Before you move on, let us cement the discipline that ensures you never destroy the Library through carelessness.
I will repeat it one last time, for it is the most important sentence of this location: UPDATE and DELETE without WHERE act on the whole shelf. Build the habit of writing the
WHERE condition before you write the rest of the command.An experienced scribe never shoots in the dark. First they check which rows will be affected, by turning the
UPDATE/DELETE into a SELECT with the same WHERE:1SELECT * FROM ksiazki WHERE dostepna = 0;If this
SELECT returns exactly the scrolls you want to remove - only then do you run:1DELETE FROM ksiazki WHERE dostepna = 0;WHERE condition - define exactly which rows you want to change.SELECT - see how many and which rows match.UPDATE or DELETE with the same WHERE.Modify data in small portions. It is better to run several precise commands than one big one that covers too much. And if an operation is truly serious - a good scribe first makes a copy of the important scrolls. Remember: in the Library there is no trash bin and no undo.