Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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.

Answers were Sorted based on User's Feedback



Create table emp (id number(9), name varchar2(20),salary number(9,2)); The table..

Answer / nzabin

SQL Error: ORA-01439: column to be modified must be empty to change datatype
01439. 00000 - "column to be modified must be empty to change datatype"

Is This Answer Correct ?    0 Yes 0 No

Create table emp (id number(9), name varchar2(20),salary number(9,2)); The table..

Answer / nilesh

It will not work,

If u have data in a table and u have to change data type
number to varchar2 then it will gives error, If u change
varchar2(100) column to char(200) it will work,
The number to varchar2 or varchar2 to number will not work
when u have data in table.

Is This Answer Correct ?    0 Yes 2 No

Create table emp (id number(9), name varchar2(20),salary number(9,2)); The table..

Answer / tajuddin

It will work your query 100% will work

Chers
Taj

Is This Answer Correct ?    9 Yes 16 No

Post New Answer

More SQL PLSQL Interview Questions

Why do we use sql constraints?

0 Answers  


Can we interchange parameters in procedure while calling

1 Answers   TCS,


how to run 'mysql' commands from a batch file? : Sql dba

0 Answers  


How to pipe multiline string to isql?

0 Answers  


what is the difference between stored procedure and packaged procedure

1 Answers   Google, Infosys,


How do I view an execution plan in sql?

0 Answers  


how to create a table index in mysql? : Sql dba

0 Answers  


how to enter binary numbers in sql statements? : Sql dba

0 Answers  


What is the maximum number of rows in sql table?

0 Answers  


How do you delete data from a table?

0 Answers  


When is the update_statistics command used?

0 Answers  


what is a constraint? Tell me about its various levels. : Sql dba

0 Answers  


Categories