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 / lakshmanakumar

There should be error raised as below
ORA-01439: column to be modified must be empty to change
datatype

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How global cursor can be declare with dynamic trigger ?

1937


What are the differences between in and exists clause?

782


How to get unique records from a table?

679


What is the syntax and use of the coalesce function?

808


what happens if you no create privilege in a database? : Sql dba

711






Does google use sql?

700


what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?

2182


What are the limitations of sql express?

697


Are views faster than queries?

725


What is embedded sql in db2?

708


Which sql statement is used to return only different values?

705


How to know the last executed procedure?

806


What is auto increment?

733


Explain the uses of a database trigger?

778


What is coalesce in sql?

727