Adding a new column to a database table is simple in theory, but in production it carries weight. Schema changes can lock tables, block writes, and ripple through dependent systems. Done carelessly, they slow every request. Done right, they extend capability without downtime.
To add a new column in SQL, define its name, data type, default value, and constraints. The operation might look like:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP DEFAULT NOW();
On small data sets, this applies instantly. On large, live systems, execution strategy matters. You may need to create the column without defaults, backfill data in batches, then apply constraints after. Monitor locks and query plans. Consider whether the new column will require indexing, and calculate the cost of adding that index during peak traffic.