What does the following SQL statement return, assuming that
all tables and column names are correct?
SELECT FirstName, StreetAddress
FROM Employees
JOIN AddressBook
ON Employees.EmpID = AddressBook.EmpID

a) Nothing, the JOIN syntax is wrong.
b) All the records form the Employees table, and only the
matching ones form the StreetAddress table.
c) All the records from the StreetAddress table and only the
matching records form the Employees table.
d) Only the matching records from the two tables.

Answers were Sorted based on User's Feedback



What does the following SQL statement return, assuming that all tables and column names are correct..

Answer / karuna

option d

Is This Answer Correct ?    2 Yes 1 No

What does the following SQL statement return, assuming that all tables and column names are correct..

Answer / shikhar

I think the state ment above should return the records from
matching records from two talbes since the JOIN state ment
specifies the middle element..i.e employee...let us see how
it works..
lets say we hav two elemt rows( here i am taking the only
one column from each table since it would provide us with
the required understanding....)

employees addressbook
---------- ------------
EMP_NAME EMP_NAME
-------- -----------
ram raju
raj harish
ravi hani
rohit jitender
raju fina
manish kittu

now when these two statements are joined ,first of all the
first state ment is scanned and its first element i.e 'ram'
is matched againest the all the element of thhe other list
i.e addressbook...if it finds the name 'ram' in addressbook
it will select it as a part of the result otherwise it just
looks move on to another one thats 'raj'...n one important
thing ... in case 'ram' finds the match in the addressbook
twice...it will not take bothe of them .....it will skip
all the others and move on to the next row....

Is This Answer Correct ?    0 Yes 0 No

What does the following SQL statement return, assuming that all tables and column names are correct..

Answer / vivek

simply ans : D

becoz single JOIN means "inner join" which return common
record

Is This Answer Correct ?    1 Yes 1 No

What does the following SQL statement return, assuming that all tables and column names are correct..

Answer / ar prabhakaran

d) Only the matching records from the two tables.

JOIN will return only matching column values from both tables.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

Explain asp.net mvc request life cycle? : asp.net mvc

0 Answers  


Your manager has asked you to describe what you would use application variables for. What statement best describes the use of application variables? a) Application Variables are used to keep state for each connected user. b) Application Variables are used to keep state for the web site c) Application Variables are used to keep state for the application on the server d) Application Variables are used to keep state for all applications objects in the web site.

1 Answers   Syntax Softtech,


How can u handle Exceptions in Asp.Net?

4 Answers  


What is the role of global.asax?

10 Answers   Infosys,


Which namespace in used to connction web cam

3 Answers  






what is the trace in ASP.NET

4 Answers  


How can we provide the WebParts control functionality to a server control?

0 Answers   MindCracker,


can we transfer data from one page to another page using viewstate if so how?if not y?

37 Answers   AppShark, DataSync, Gtech, iGate, Wipro,


What is the difference between exe and dll?

0 Answers  


different architectures of asp.net?

1 Answers  


What is the difference between a session object and cache object

2 Answers   CitiGroup, PennyWise,


What is skin in asp.net?

0 Answers  


Categories