hi guys,
i wanna change the type of a column i have in my table;
for example from int(4) to varchar(20).
any script to do that??
thanks in advance
Printable View
hi guys,
i wanna change the type of a column i have in my table;
for example from int(4) to varchar(20).
any script to do that??
thanks in advance
You need to alter the table for that.
Use alter table.
SQL> CREATE TABLE TEST_DATA ( X NUMBER);
Table created.
SQL> ALTER TABLE TEST_DATA MODIFY (X VARCHAR2(10));
Table altered.
You may not decrease the size of a columns or change its data type , unless it contains no data (especially for numeric data)