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
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 |
Answer / vivek
simply ans : D
becoz single JOIN means "inner join" which return common
record
| Is This Answer Correct ? | 1 Yes | 1 No |
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 |
Can we add code files of different languages in app_code folder?
What is the difference between ASP.NET Webforms and ASP.NET MVC?
How we can bind textbox,listbox and datagrid to sql server database in asp.net using visualstudio.net language (vb.net)?
What is the difference between ASP Session State and ASP.Net Session State?
Is data can be edited in the Repeater control?
which is faster ArraytList Or Collection ? how? hows the Hashing works internally ?
1.What r collections? 2.What is .pdb file? 3.Is it possible to provide access to users in master page? 4.What is dirty n Phantom Read(SQL)? 5.What r different isolation levels(SQL)? 6.How to set authentication mode in web.config file?
What is the difference between server-side scripting and client-side scripting?
What is the difference between response.redirect and server.transfer?
can any one explain about 3-tier architecture and how to deploy 3 layers of 3-tier architecture in 3 different servers.plz send me .net code
is it possible to persiste customize object in view state? how it is?
How many Controls present in Asp dot net?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)