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

It wo'nt work because if there is an data exist in
(id number(9)).You cannot modify if colmun is not empty.

Is This Answer Correct ?    15 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a rank in sql?

714


Can we create table in function?

730


how would you get the current date in mysql? : Sql dba

724


How can I change database name in sql?

703


What is a primary key called that is made up of more than one field?

1026






What is index example?

749


How many joins in sql?

736


Explain how you can copy a file to file content and file to pl/sql table in advance pl/sql?

735


What is the use of function in sql?

728


Define commit, rollback and savepoint?

765


What are different joins used in sql?

727


What is schema in sql?

683


Can we connect to postgresql using sql developer?

697


What will you get by the cursor attribute sql%notfound?

777


How many sql are there?

733