Raj
Raj

Reputation: 209

ORA-00905: missing keyword - Alter table modify column not working in Oracle 10g

I regularly take caution when creating tables for database. This time I came across a situation to alter a table.

I wanted to change the Data Type of a field/column in Table.

To change the data type of a column in a table: General Syntax

ALTER TABLE table_name ALTER COLUMN column_name datatype

SQL Query :

alter table employee modify column ename varchar(40);

I Rarely use Alter and Modify commands. This time when tried, it throws me an Error as ORA-00905: missing keyword.

I surfed the Internet and referred StackOverflow raised questions, but there is no relative answer found.

I also referred this Oracle Documentation : Oracle Reference Documentation

But It did not help.

Upvotes: 1

Views: 14546

Answers (2)

Susmithasubramanyam
Susmithasubramanyam

Reputation: 21

Try This: ALTER TABLE Shopper MODIFY MobileNo(varchar2(15))

Upvotes: 0

avk
avk

Reputation: 871

Do this

ALTER TABLE table_name MODIFY column_name datatype

Upvotes: 6

Related Questions