When I add a non-nullable column to a non-empty table, I certainly have to add a default.
IIRC, with older versions, I had to use a two-step approach because adding a non-nullable column on non-empty tables was not allowed at all):
With newer versions (say, v12), I can do that as desired in one step:
However, this fails with an -116 SQL CODE error ("Table must be empty") when trying to add more than one such column:
(The same is true for adding table contraints, AFAIK.)
Why is that limitation - and is it documented anywhere?
The limitation was not documented, and has been partially relaxed for SQLA 16 with performance improvements to ALTER TABLE statement. The limitation itself was related to implementation.