When you add a new column to a table, you alter the contract between your database and every system that consumes it. The schema grows. Indexes may need updates. Default values matter. Even a nullable field has a cost. Understanding the mechanics is the difference between a smooth migration and hours of rollback.
In SQL, the process is straightforward. Use ALTER TABLE with ADD COLUMN. Specify data type, constraints, and default if necessary:
ALTER TABLE users
ADD COLUMN last_login TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
But execution speed depends on the database engine, the dataset size, and whether the operation is blocking. In PostgreSQL, adding a column without a default is fast. With a default, the database may rewrite the table, locking it for the duration. MySQL has similar considerations, but storage engines like InnoDB handle some cases differently.