Oracle alter table modify column from NVARCHAR2 to VARCHAR2 Having a column FIRSTNAME NVARCHAR2(30) converted from VARCHAR2(30) with

alter table ANGESTELLTER modify FIRSTNAME NVARCHAR2(30) -- worked!


I tried to restore the original. However

alter table ANGESTELLTER modify FIRSTNAME NVARCHAR2(30) -- fails!


gives an Ora-01439 error, that the values must be empty.

First introducing a new column FIRSTNAME2 VARCHAR2(30), copying and renaming did not succeed, maybe due to failing Oracle experience?
Please try this, its working for me.  Hope it helps you.

CREATE TABLE TEST_1
(
FIRSTNAME VARCHAR2(30)
);

INSERT INTO TEST_1(FIRSTNAME)
VALUES('NARENDRA');

COMMIT;

ALTER TABLE TEST_1
MODIFY FIRSTNAME  NVARCHAR2(30);

--Gives Error while modifying
/*ALTER TABLE TEST_1  MODIFY FIRSTNAME  VARCHAR2(30);8*/

ALTER TABLE TEST_1
ADD (FIRSTNAME2 VARCHAR2(30)
);


UPDATE TEST_1
SET FIRSTNAME2= substr(FIRSTNAME,1,30)

COMMIT; 

ALTER TABLE TEST_1
DROP COLUMN FIRSTNAME;  

ALTER TABLE TEST_1
RENAME COLUMN FIRSTNAME2 TO FIRSTNAME;