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

what is top in tsql? : Transact sql

533


What does a pl/sql package consist of?

510


What are aggregate and scalar functions?

519


what is a composite key ? : Sql dba

588


What is flag in sql?

531






how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba

539


How to use sql statements in pl/sql?

574


Can a trigger call a stored procedure?

530


Is mariadb nosql?

575


How do I trace sql profiler?

487


What is the use of function "module procedure" in pl/sql?

657


Is natural join and inner join same?

485


What is the difference between cross join and natural join?

556


Explain what is rdbms?

578


What are triggers in sql?

574