Monday, September 9, 2024

How do I add a column to an existing table in SQL Server?

 To add a new column to an existing table, use the ALTER TABLE command:

ALTER TABLE YourTableName ADD NewColumnName INT;

This adds a new column named NewColumnName with an INT data type to YourTableName.