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   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories >> Software >> Databases >> SQL-PLSQL
 
 


 

Back to Questions Page
 
Question
HOW CAN I FIND MAX SAL ,ENAME FROM EMP TABLE.
Rank Answer Posted By  
 Question Submitted By :: 11/14/2008
I also faced this Question!!   © ALL Interview .com
Answer
select max(sal),ename from emp where sal=(select max(sal) 
from emp) group by ename;
 
0
Pramod Janjirala
 
 
Answer
select sal,ename from emp where sal=(select max(sal) from 
emp);
 
0
Pramod Janjirala
 
 
Answer
SELECT ename,MAX(sal) 
  FROM EMP
  GROUP BY ename;
 
0
Suresh Kumar Somayajula
 
 
 
Question
What is the difference between CHAR and VARCHAR2? If 
VARCHAR2 serves the uses of CHAR why CHAR is still used and 
not been discarded yet?
Rank Answer Posted By  
 Question Submitted By :: Niru2377
This Interview Question Asked @   Oracle
I also faced this Question!!   © ALL Interview .com
Answer
in char it allocates the memory space as static where as in 
varchar2 it allocates the memory space as dynamic


OR

char is a space mapping function where as in varchar2 it is 
not mapping the space it occupies the exact size of the 
string
 
0
Hannan
 
 
Question
Can we use SQL%ISOPEN in implicit cursors? Does this 
attribute works properly in Implicit Curosors?
Rank Answer Posted By  
 Question Submitted By :: Kolipaka
I also faced this Question!!   © ALL Interview .com
Answer
Implicit cursors:  SQL%ISOPEN always returns FALSE, 
indicating that the implicit cursor has been closed.

I hope below example gives you very fair idea.

SQL> BEGIN
  2     UPDATE employee
  3        SET salary = salary *2
  4     WHERE id = '01';
  5
  6  IF not SQL%ISOPEN THEN
  7       DBMS_OUTPUT.PUT_LINE('closed');
  8  END IF;
  9  END;
 10  /
closed

PL/SQL procedure successfully completed.

Thanks
-Pr@$@d
 
0
Pr@$@d
 
 
Question
how to select alphabets in a one  column , for this the 
table name is PA_TASKS and column name is TASK_NUMBER, In 
TASK_NUMBER the data like this 
1.1.3NN,1.1.4NN,1.5.1NN,1.3.2NE,1.5NN,1NN,1.2NE,1CE , For 
this i need to disply output as NN,NN,NN,NE,NN,NN,NE,CE,  
Its some urgent requirement ,thanks in advance
Rank Answer Posted By  
 Question Submitted By :: Surendrababu
I also faced this Question!!   © ALL Interview .com
Answer
Dear friend
,
you can use this select statement:-

select trim(translate(TASK_NUMBER,'.0123456789',' ')) from 
PA_TASKS;
For example:-
select trim(translate('1.1.3NN','.0123456789',' ')) from 
dual;

it will give NN as output 

if value format same like this then you can use substr 
function also for it like this:-
select substr(TASK_NUMBER,-2) from PA_TASKS ;
For example:-

select substr('1.1.3NN',-2) from dual; 

it will give NN as answer.
 
0
Hitendra Yadav
 
 
Answer
select substr(task_number,-2) from pa_task;
 
0
Anju Hajela
[Tata]
 
 
Question
hi this is nakka i have been looking for 1+ exp in oracle 
sql,plsql developer positions also have knoledge on d2k
 i am not getting proper walkins how to know it? where can 
i find it?
Rank Answer Posted By  
 Question Submitted By :: Nakkaobulesh
I also faced this Question!!   © ALL Interview .com
Answer
Hi friend,

As you know that market is poor now, however my kind 
suggestion is that please learn Unix shell scripting also. 

You must have good exposure in SQL and PL/SQL and unix , if 
you have idea about Oracle forms & reports it is added 
advantage.

If possible please get certified in OCA and OCP. 

If you have any queries do mail to prasadreddi_mca@yahoo.com

Thanks
-Pe@$@d.
 
0
Pr@$@d
 
 
Question
how to connect oracle in unix prompt?
Rank Answer Posted By  
 Question Submitted By :: Shanmugavelu.raman
This Interview Question Asked @   Polaris
I also faced this Question!!   © ALL Interview .com
Answer
HI,
This is not a big job
$ su orcale10g
$sql plus
username/password-scott/tiger

If not connected just mail me on my mail id
omkarp.joshi@yahoo.co.uk
 
0
Omkar Pattajoshi
 
 
Question
Hello All, Could any well write a query for the following 
scenario. 

Account(table name)
No  Name   Amount 
1   ABCD   2000.00 
2   DEFG   -2000.00 
3   GHIJ    3000.50 
4   JKLM    4000.00 
5   MNOP    6000.00 

O/p Should be in this format 
No  Name  Credit  Debit 
1   ABCD  2000.00  0 
2   DEFG  0       -2000.00 
3   GHIJ  3000.50          
4   JKLM  0        -4000.00 
5   MNOP  6000.00    o

 could any one give appropriate query for this 
Thnks in Advance 
Suneel Reddy
Rank Answer Posted By  
 Question Submitted By :: Suneelreddy
This Interview Question Asked @   Target
I also faced this Question!!   © ALL Interview .com
Answer
Select No,Name,to_char(Sal,'$9999.99') amount from emp;
 
0
Suresh Kumar Somayajula
 
 
Answer
select no, name,
case amount/abs(amount) when 1 then amount else 0 end credit,
case amount/abs(amount) when -1 then amount else 0 end Debit
from account
 
0
Mkumar.it
 
 
Answer
select sno,name,decode(sign(amount),1,0,amount)debit,decode
(sign(amount),-1,0,amount)credit from account
/
 
0
Saravana Sundar
 
 
Question
Hello All,

Could any well write a query for the following scenario.

Account(table name)

No Name Amount
1 ABCD 2000.00
2 DEFG -2000.00
3 GHIJ 3000.50
4 JKLM 4000.00
5 MNOP 6000.00


O/p Should be in this format

No Name Credit Debit
1 ABCD 2000.00 0
2 DEFG 0 -2000.00
3 GHIJ 3000.50
4 JKLM 0 -4000.00
5 MNOP 6000.00 o


could any one give appropriate query for this

Thnks in Advance
Rank Answer Posted By  
 Question Submitted By :: Suneelreddy
This Interview Question Asked @   Target
I also faced this Question!!   © ALL Interview .com
Answer
select no, name,
case amount/abs(amount) when 1 then amount else 0 end credit,
case amount/abs(amount) when -1 then amount else 0 end Debit
from account
 
0
Mkumar.it
 
 
Question
what the meaning of sql
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
Structured Query Language
 
0
Manoj
 
 
Answer
SQL abbriveated as "Structured Query Language".It is used 
to interact with the database.
 
0
Suresh Kumar Somayajula
 
 
Answer
This is an acronyms wherein S stands for Structures, Q 
stands for  Query and L for Language.
It was named as Structured English Query Language that is 
SEQUEL
 
0
Rajesh K. Gupta
 
 
Answer
sql acronym is structured query language.it is a standard
language used in the development of any rdbms tool.
it is developed by E.F.CODD.
 
0
Neha
 
 
Question
how to remove records from table?
no name
1   a
2   b
1   a
2 b
3  c
Rank Answer Posted By  
 Question Submitted By :: Sophia
This Interview Question Asked @   Oracle
I also faced this Question!!   © ALL Interview .com
Answer
delete From <table>;
 
4
Kriahna Chaitanya
 
 
Answer
truncate table <tbl_nm>
 
0
Chinna
 
 
Answer
Delete from table name where row_id not in (select min(no)
from table_name group by no)
 
0
Pratap
 
 
Answer
delete from table name;
or truncate table name;
 
0
Pratap
 
 
Question
why use cursors?
Rank Answer Posted By  
 Question Submitted By :: Sophia
This Interview Question Asked @   Oracle
I also faced this Question!!   © ALL Interview .com
Answer
Cursor is used to process multiple rows using pl/sql.
 
0
Aravind
 
 
Answer
Cursor : It's a private SQL worksheet area where we can 
execute SQL commands and processing information.
The purpose of the Cursor is,  PL/SQL execution block will 
process only one records means it will return only one 
records.If we want to retrieve or process more number of 
records we use the "Cursors". 
These are of two types.
1. Implicit Cursor 2. Explicit cursors.

Thank you,
Suresh
 
0
Suresh Kumar Somayajula
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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