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


Please Help Members By Posting Answers For Below Questions

Can you skip header records while loading? : aql loader

730


Why plvtab is considered as the easiest way to access the pl/sql table?

833


What are dml commands?

741


What is execution plan in sql?

760


Explain table and field in sql?

781






name 3 ways to get an accurate count of the number of records in a table? : Sql dba

790


What are the different dcl commands in sql?

763


What is a call statement? Explain with an example.

745


Is merge a dml statement?

731


What are the features of pl sql?

768


What is t-sql? : Transact sql

710


How many types of literals are available in pl sql?

750


What is application trigger?

733


What is oracle sql developer?

788


what is myisam? : Sql dba

758