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 / shailesh j

If column contains data then we can only modify size of
column without changing its data type. But if the column is
empty then we can modify its size as well data type.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are few of the schema objects that are created using PL/SQL?

553


what is csv? : Sql dba

567


What are triggers and its types?

547


How do you modify a trigger?

520


How are functions and procedures called in PL/SQL?

584






What are the types pl/sql code blocks?

601


What are the ways on commenting in a pl/sql code?

509


What is trigger and stored procedure in sql?

549


Does sql support programming?

543


What is an inner join sql?

540


which tcp/ip port does sql server run on? : Sql dba

507


How do I remove sql plus from windows 10?

560


How do I run a sql query?

525


what is an alias command? : Sql dba

540


How do I view stored procedures?

534