127k views
3 votes
Based on the Pizza database you imported, complete the SQL statement below to add the column VIP to the customers table. The customer will either be GOLD, SILVER, BRONZE level VIP. There is a blank in the query, and you should enter the required text in the box below. When completing the statement, ensure you use the same naming conventions as other columns in the database and choose the most appropriate datatype. Your answer will be marked incorrect if there is a spelling mistake, missing spaces, or unnecessary spaces. ALTER TABLE Customers ADD [a]

1 Answer

1 vote

Answer:

The answer is: ALTER TABLE Customers ADD vip text;

Step-by-step explanation:

The basic syntax for the ALTER TABLE command in SQL for adding a new column is:

ALTER TABLE tableName ADD columnName dataType;

In this case, the following replacements must be made:

tableName = Customers

columnName = vip

dataType = text

Notice that the Pizza database referenced, is not included in the question, so the following assumptions were made:

  • Column names are lowercase.
  • vip values are stored in the same Customer table, instead of using a foreign key to another table.
User Xorpower
by
5.0k points