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

It Will not work properly. when ever the table with data
user can't chage the column's datatype. It allows to
increase the size of the data type only.

Is This Answer Correct ?    14 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a query to display the current date in sql?

737


what is offset-fetch filter in tsql? : Transact sql

713


What is the left table in sql?

697


Can we use two order by clause in query?

738


How do you delete duplicates in sql query using rowid?

720






What is replication id?

683


What is #table in sql?

704


How to avoid using cursors? What to use instead of cursor and in what cases to do so?

863


what is a composite key ? : Sql dba

797


how to decrement dates by 1 in mysql? : Sql dba

760


What are the sql versions?

672


When is the update_statistics command used?

767


How do I create an index in word?

726


How are functions and procedures called in PL/SQL?

800


What is the difference between view and stored procedure?

686