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 / sathish p

We cant change column datatype while the column having
values.. Bcos error will come when u run the Alter table
modify statement...

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the difference between a having clause and a where clause? : Sql dba

512


What does the acronym acid stand for in database management?

532


Why indexing is needed?

509


Can we use two order by clause in query?

539


What is trigger and types?

550






What are the types of join in sql?

512


Are pl sql variables case sensitive?

589


What are the different dcl commands in sql?

552


Is it important to partition hard disk?

526


Can we write dml inside a function in sql server?

489


How do I delete a trigger?

532


How to select the Nth maximum salary from Table Emp in Oracle SQL Plus ?

590


what are the system privileges that are required by a schema owner (user) to create a trigger on a table?

609


How does an execution block start and end in pl sql?

491


What are the ddl commands?

527