2) Consider a Table name A which has below records
ID
---
5
5
5
5
5
Consider another table B which has below records
ID
--
5
5
5
5
5
5
5
5
How many rows will be returned by each of the below queries
a) select * from A inner join B on A.id = b.ID
b) select * from A left join B on A.id = b.ID
c) select * from A right join B on A.id = b.ID
Answers were Sorted based on User's Feedback
Solution :
a) 40 rows
b) 40 rows
c) 40 rows
http://abhishekgaikwadtech.blogspot.in/2015/07/t-sql-interview-question-2.html
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / swetha
40 rows but using cross join we can get no of rows
| Is This Answer Correct ? | 1 Yes | 0 No |
how to find nth highest salary
103 Answers Cognizant, IBM, NexGen, Oracle,
What is Deadlock?
What is a covering index?
How do we know if any query is retrieving a large amount of data or very little data?
How to avoid cursors?
3 Answers CarrizalSoft Technologies, HP,
What is difference between clustered and non clustered index?
What is the difference between substr and charindex in the sql server?
What is a primary key?
How to modify an existing user defined function?
Plz tell about backup&recovery?
how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A
Can a rule be bound to any column of any data type?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)