Create table emp
(id number(9), name varchar2(20),salary
number(9,2));
The table has 100 records after table created.Now i nee to
change id's Datatype is to be Varchar2(15). now
Alter table emp modify(id varchar2(15),name varchar2(20),
salary number(9,2));
Whether it will work or returns error? post answer with
explanation.
Answer Posted / nilesh
It will not work,
If u have data in a table and u have to change data type
number to varchar2 then it will gives error, If u change
varchar2(100) column to char(200) it will work,
The number to varchar2 or varchar2 to number will not work
when u have data in table.
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What are database links used for?
How do I install sql?
What operating systems are supported by oracle sql developer?
What are the operators used in select statements?
How many types of normalization are there?
Can we use rowid as primary key?
what are the different type of normalization? : Sql dba
Explain the purpose of %type and %rowtype data types?
How many commands are in sql?
How do you run a query?
How to change the order of columns in Oracle SQL Plus ?
Can %notfound return null after a fetch?
what is a trigger in mysql? Define different types of trigger. : Sql dba
What do you know by pl/sql cursors?
What are the advantages of pl sql over sql?