GeekInterview.com
  I am new, Sign me up!
 

SQL Interview Questions


SQL Interview Questions

Questions: 171
Comments: 945
 SQL Tags
 Showing Questions 141-150 of 171 Questions
<< Previous 11 12 13 14 [15] 16 17 18 Next >>
 Sponsored Links

 
 SQL Interview Questions
Sorting Options :  

EXISTS is more faster than IN because EXISTS returns a Boolean value whereas IN returns a value. 
Latest Answer: Exist is more faster than IN because IN doesn't use indexes at the time of fetching but Exist uses Index at the time of fetching. ...

Outer Join--Its a join condition used where you can query all the rows of one of the tables in the join condition even though they don’t satisfy the join condition. 
Latest Answer: outer join is that type of jon which retrives the matach & alson unmatached recores also from the tables ...

SELECT * FROM empWhere emp_no+' '=12345;i.e you have to concatenate the column name with space within codes in the where condition.SELECT /*+ FULL(a) */ ename, emp_no from empwhere emp_no=1234;i.e 
Latest Answer: One way is to diable the index on the column using syntaxAlter index indexname on table_name disable.One way is to apply  /*+no_index */ hint to the query For eg: select ename /*+no_index */from empwhere ename ='smith' ...

It is a column that is not an actual column in the table.eg USER, UID, SYSDATE, ROWNUM, ROWID, NULL, AND LEVEL. 
Latest Answer: Pseudo columns is not actula column in the table. it behaves like table columnwe can retivesv values of pseduo column but can not insert,update or delete value in that.has two data type 1. rowid  2. urowidrow id uniqely identify row in databaseEXM ...

select rownum, empno, ename from emp where rowid in (select rowid from emp where rownum  
Latest Answer: select * from employees where salary between(1000 and 5000); ...

SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal 
Latest Answer: SELECT v.sal FROM (SELECT TO_NUMBER(salary) sal,rank() over (ORDER BY TO_NUMBER(salary) DESC) ranksal FROM employee ORDER BY 1 DESC)v WHERE v.ranksal=6 Pls note where 6 is the ranknumber ...

Odd number of records:select * from emp where (rowid,1) in (select rowid, mod(rownum,2) from emp);Output:-135Even number of records:select * from emp where (rowid,0) in (select rowid, mod(rownum,2) from 
Latest Answer: select rownum from dual where rownum=(select rownum/2 0 from dual) ...

A bad answer is count them (SELECT COUNT(*) FROM table_name)A good answer is :-'By generating SQL to ANALYZE TABLE table_name COUNT STATISTICS by querying Oracle System Catalogues (e.g. USER_TABLES 
Latest Answer: If you want to find the number of Rows in table SELECT COUNT(*) FROM EMP;This is valid query ...

select level, min('col_name') from my_table where level = '&n' connect by prior ('col_name')  
Latest Answer: TO find out nth LOWEST value, e.g. salary from emp table without using ROWNUM & DESC/ASCSELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal))                        ...

Oracle uses work area to execute SQL statements and store processing information PL/SQL construct called a cursor lets you name a work area and access its stored information A cursor is a mechanism used 
Latest Answer: Oracle ueses the private area for excute SQL statements and store processing information. The private area is called as CONTEXT AREACURSOR: cursor is a handle or pointer to the context area. ...

View page << Previous 11 12 13 14 [15] 16 17 18 Next >>

Ask A Question
Go Top
 Sponsored Links

 
Sponsored Links

 
Ask Question
You must login to Ask Question or Register your free account

Category:

 
Question Title:


Question in Detail:

Add this to my Subscribed Questions (?)
Send me email when new answer is posted (?)

 
Subscribe
Get Latest Updates Via RSS Reader or by Email
 Forum Discussion Subscribe to Forum Discussions Via E-Mail Latest Forum Discussions Subscribers
 Knowledge Base Subscribe to Knowledge Base Series Via E-Mail Knowledge Base Subscribers
 Learning Series Subscribe to GeekInterview Learning Series Via EMail Learning Series Subscribers
 Freelance Jobs Subscribe to GeekInterview Freelance Jobs Via EMail Latest Freelance Jobs Subscribers
 GeekInterview Blog Subscribe to GeekInterview Blog Via EMail GeekInterview Blog Subscribers
 Testing Interview Questions Subscribe to Testing Interview Questions Via EMail Testing Interview Questions Subscribers
 Oracle Interview Questions Subscribe to Oracle Interview Questions Via EMail Oracle Interview Questions Subscribers
 Java Interview Questions Subscribe to Java Interview Questions Via EMail Java Interview Questions Subscribers
 Latest Placement Papers Subscribe to Latest Placement Papers Placement Papers Subscribers
 Free Training Subscribe to Free Training Via EMail Free Training Subscribers
 Learn AJAX Subscribe to AJAXwith.com Via EMail AJAXwith Subscribers
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape