Statement failed, SQLCODE = -625 validation error for column ID, value "*** null ***"
You might see this error whenever a NOT NULL column contains NULLs.
A particular case where it is hard to track is when you try to define PRIMARY KEY constraint, which requires that no record contains NULL. You might even issue statements like:
select * from table1 where pk is null;
update table1 set pk = 1 where pk is null;
Everything might look alright, but creating primary key would fail.
In such case, there is a good chance that you have some other user connected to the same database, running some transaction. This transaction might be too old to know about your update, and it would still see the old record versions that have NULLs in them. Creation of primary key works for everyone, so when Firebird tries to put those old records with NULLs into primary key index, the statement breaks.
In short: if you have a column that used to be nullable, and you turn it into NOT NULL, populate it with values and wish to create a primary key that includes it - make sure nobody else is running a transaction on the database. If you use Firebird 2.1 or above, you can check this easily via monitoring tables (just SELECT FROM MON$STATEMENTS)