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 create a ddl trigger using "create trigger" statements?
How to update multiple rows with one update statement in ms sql server?
can we call functions from stored procedure in SQL Server 2005 ? How?
What is normalization and denormalization in sql server?
what is procedure in sql?
How can you transfer data from a text file to a database table? Or how can you export data from a table to a comma delimited (csv) file? Or how can you import data from ms access to a table in a database? Or how can you export data from a table to an excel file?
What is subquery in sql?
How to disable stored procedure sql server?
What number sorts of privileges are accessible in sql?
Explain what are magic tables in sql server?
What is an execution plan? When would you use it? How would you view the execution plan?
Can we use where and having clause together?