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 |
Where can you find the error log information? : sql server database administration
What's the difference between a primary key and a unique key?
what purpose does OPENXML clause have in sql server stored procedure?
What are types of scd? : sql server analysis services, ssas
Do you know hot add cpu in sql server 2008?
can we call functions from stored procedure in SQL Server 2005 ? How?
What is the use of tempdb? What values does it hold?
What are the different SQL Server Versions you have worked on?
1. SELECT SUM(sal) as “Gross Salary” from EMPLOYEES; 2. SELECT MAX(sal) as “Highest Salary” from EMPLOYEES; ouput should be in table format
Is it possible to have more then one foreign key in a single table? if possible, is this the good way to design the table?
What is sub query and its properties?
How to delete an existing database user?