GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL
Go To First  |  Previous Question  |  Next Question 
 SQL  |  Question 115 of 170    Print  
There are 10 rows in Table A and 0 Rows in table B.
Select * from A,B
How many rows will be retrieved.
10 rows


  
Total Answers and Comments: 7 Last Update: June 30, 2008     Asked by: Eshwar 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: avivbab2000
 
no rows selected

Above answer was rated as good by the following members:
spohilko
February 09, 2007 04:29:04   #1  
avivbab2000        

RE: There are 10 rows in Table A and 0 Rows in table B...
no rows selected
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
February 16, 2007 09:14:34   #2  
Suganya        

RE: There are 10 rows in Table A and 0 Rows in table B...
Hi,The basic funda in Oracle is Any addition,multiplication,division and joining two tables with one as null,Oracle will give the output only as Null.In your case there will be no rows selected.that is why the functionality of outerjoin is in Oracle.
 
Is this answer useful? Yes | No
February 19, 2007 14:56:04   #3  
akhil        

RE: There are 10 rows in Table A and 0 Rows in table B...
no rows will be selected
 
Is this answer useful? Yes | No
February 20, 2007 04:38:00   #4  
kiran        

RE: There are 10 rows in Table A and 0 Rows in table B...
No rows will be selected
 
Is this answer useful? Yes | No
March 12, 2007 09:17:05   #5  
nimisha agrawal        

RE: There are 10 rows in Table A and 0 Rows in table B...
it will not select any row.coz according to this query it has to give cartesian product.that means it will select m into n rowsso 10*0=0
 
Is this answer useful? Yes | No
June 27, 2008 03:12:21   #6  
nandk.sharma Member Since: June 2008   Contribution: 10    

RE: There are 10 rows in Table A and 0 Rows in table B. Select * from A,BHow many rows will be retrieved.
no rows will be retrieved.
The Cartesian product will only yield records when there is atleast one record in both the tables i.e.   A and B.

 
Is this answer useful? Yes | No
June 30, 2008 05:01:54   #7  
jasvinderss Member Since: June 2008   Contribution: 1    

RE: There are 10 rows in Table A and 0 Rows in table B. Select * from A,BHow many rows will be retrieved.
There could be two cases
(1) if you supply the query as Select * from A,B
you have not mentioned any join condition in this case 10 rows will be selected.
(2)if you supply a join condition with the above queries with a common filed between them, then in that case no rows will be selcted.

 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape