ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Databases  >>  SQL PLSQL
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
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.
 Question Submitted By :: Guru
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
It will work your query 100% will work 

Chers
Taj
 
Is This Answer Correct ?    1 Yes 3 No
Tajuddin
 
  Re: 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
# 2
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 ?    1 Yes 2 No
Imran
 
 
 
  Re: 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
# 3
It will raise error ora-1439 column to be modifiedy must be
empty to change datatype.
 
Is This Answer Correct ?    5 Yes 0 No
Rinson
 
  Re: 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
# 4
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 ?    4 Yes 0 No
Subbarayulu
 

 
 
 
Other SQL PLSQL Interview Questions
 
  Question Asked @ Answers
 
1 SELECT a.field1, b.field2, c.field3, d.field4 2 FROM atable a, atable b, ctable c, dtable d 3 ? 4 ORDER BY 1 What is the minimum number of joins that must be specified on line 3 in the sample code above to properly link the tables? Notice that the table "atable" is aliased twice: once as "a" and once as "b." 1. One join 2. Two joins 3. Three joins 4. Four joins 5. Five joins Sonata3
Explain the usage of WHERE CURRENT OF clause in cursors ?  2
What are the advantages of VIEW?  3
What are different types of joins ? BirlaSoft3
how to create a database in oracle?  2
Begin For j in 4403201000 .. 4403202000 Loop If mod (j, 100) = 0 then Dbms_output.put_line (j); End if; End loop; End; what will be the output of this question TCS4
Can a view be updated/inserted/deleted?If Yes under what conditions?  3
how can we find the select statement is indexed or not? CTS2
Wat is SGA ? ABB1
What is a Procedure ?  2
Can we write create command in the plsql block?if possible how?  2
in procedure how to return a value Wipro3
What are the types of triggers ? TCS4
Give the structure of the procedure ?  1
What are the two parts of a procedure ? Hi-Caliber-IT4
What SQL keyword must immediately follow the UNION ALL statement? 1. SELECT 2. INTO 3. ORDER 4. WHERE 5. JOIN  2
What will happen after commit statement ?  2
check whether all the emp numbers are indeed unique.  3
What is the difference between join and union.  10
How to display the contents of a current record fetched in a reference cursor?  1
 
For more SQL PLSQL Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com