220k views
5 votes
Which of the following keywords can be used to change the size, datatype, and/or default value of an existing column?

A.ADD
B.MODIFY
C.CHANGE
D.RESET

User Asif Jalil
by
7.4k points

1 Answer

3 votes

Final answer:

To modify an existing column's properties like size, datatype, or default value, the keywords MODIFY or CHANGE are used in SQL. MODIFY alters the column without renaming, while CHANGE can also rename it. ADD adds new columns, and RESET is not a standard SQL keyword for this purpose.

Step-by-step explanation:

To change the size, datatype, and/or default value of an existing column in a database, you can use the MODIFY or CHANGE keywords depending on the SQL database you are working with. The MODIFY keyword is typically used in Oracle and MySQL databases to alter the definition of a column without renaming it. The CHANGE keyword is used in MySQL and allows you to change column definition as well as rename it if needed. The ADD keyword is used for adding new columns, and RESET is not typically an SQL keyword used for altering table structures.

User Linnette
by
8.1k points