You have been tasked with modifying the structure of an existing employee database to add a new column named 'PhoneNumber' that will store the employees' contact numbers. Which SQL command should you use to accomplish this task?
UPDATE Employees SET PhoneNumber VARCHAR(10);
ALTER TABLE Employees ADD COLUMN PhoneNumber VARCHAR(10);
The ALTER TABLE command is used to modify the existing structure of a database table, such as adding a new column. In this scenario, the correct command to add a new column to an existing table is ALTER TABLE Employees ADD COLUMN PhoneNumber VARCHAR(10);. The incorrect options presented involve either SQL commands for other operations or incorrect syntax.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the SQL command `ALTER TABLE` do?
Open an interactive chat with Bash
What is a VARCHAR data type in SQL?
Open an interactive chat with Bash
What are some common errors when modifying a table structure with SQL?