Sherin Joseph
Sherin Joseph

Reputation: 1

Trying to alter a column but iit is showing error saying invalid alter option

I am trying to change the data type of a particular column by using SQL query

ALTER TABLE employee
ALTER COLUMN Join_Date date;

with this it is showing error saying invalid alter option

Upvotes: 0

Views: 29

Answers (1)

dotnetom
dotnetom

Reputation: 24916

In MySQL you should use MODIFY to update your column type:

ALTER TABLE employee
MODIFY Join_Date date;

You can read about MODIFY statement in MySQL documentation

Upvotes: 1

Related Questions