Shelves are not carved in stone. Over time they must be rebuilt: add a field, change a size, remove an unnecessary one. ALTER TABLE serves this purpose. And when an entire shelf becomes useless - DROP TABLE.
1ALTER TABLE ksiazki ADD COLUMN jezyk VARCHAR(20);To the existing shelf
ksiazki we added a new field jezyk. There is no need to build the table from scratch!1ALTER TABLE autorzy MODIFY COLUMN imie VARCHAR(120);The MODIFY COLUMN clause changes the type of an existing column - here we widen
imie to 120 characters.1ALTER TABLE ksiazki DROP COLUMN jezyk;DROP COLUMN removes the field together with its data. Careful - this cannot be undone!
1ALTER TABLE recenzje RENAME TO opinie;The RENAME TO clause changes the name of the whole shelf without touching its content.
1DROP TABLE recenzje;This command permanently removes the entire table together with all the scrolls. Use it with the utmost care - the shelf and everything on it disappear. The Keeper of the Catalog always thinks twice before giving such an order.