May 2019
Intermediate to advanced
600 pages
20h 46m
English
If you made a mistake in the spelling of some enumerative values, and you realize it too late, you can fix it like so:
ALTER TYPE satellites_urani RENAME VALUE ‘titania’ TO 'Titania'; ALTER TYPE satellites_urani RENAME VALUE ‘oberon’ TO 'Oberon';
This is very useful if the application expects—and uses—the right names.
A more complicated case is when you are upgrading your database to a new version, say because you want to consider some facts that were not available during the initial design, and you need extra values for the enumerative type that we defined in the preceding code. You want to put the new values in a certain position to preserve the correct ordering. For that, you can use an ALTER TYPE syntax, as follows:
ALTER ...
Read now
Unlock full access