Using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0, the operations below have completely stumped me. The first locks up (table has DDL lock, finally killed query after 20+ minute wait). The second does not.
ALTER TABLE customer ADD primary_seg varchar2(9) NOT NULL;
This does not:
ALTER TABLE customer ADD primary_seg varchar2(9); ALTER TABLE customer MODIFY primary_seg NOT NULL;
There are no records in the table, there are no other users than myself on the instance, and I have no other queries executing which might cause a lock.