Reputation: 11
Why am I getting following errors with this query?
-- NOT NULL
ALTER TABLE employee
MODIFY FirstName NOT NULL;
Error starting at line : 23 in command - ALTER TABLE employee MODIFY FirstName (NOT NULL) Error report - SQL Error: ORA-00902: invalid datatype 00902. 00000 - "invalid datatype" *Cause:
*Action: Table EMPLOYEE altered.
Upvotes: 0
Views: 143
Reputation: 143163
Wrong syntax. Remove brackets.
SQL> create table employee (first_name varchar2(10));
Table created.
SQL> alter table employee modify first_name not null;
Table altered.
SQL>
Upvotes: 1