0
How is MODIFY used with ALTER query?
what is the purpose of using it with alter command.
2 Answers
+ 3
to change data type of an attribute
for example an attribute phone_no in a student table
ALTER TABLE STUDENT
MODIFY(PHONE_NO INTEGER)
0
The ALTER TABLE statement is used to add, delete, or modify columns in an existing table.
The ALTER TABLE statement is also used to add and drop various constraints on an existing table.
ALTER TABLE table_name
ADD column_name datatype;
ALTER TABLE Customers
ADD Email varchar(255);
ALTER TABLE table_name
DROP COLUMN column_name;
ALTER TABLE Customers
DROP COLUMN Email;