Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Join table

Author  Topic 

siumui
Yak Posting Veteran

54 Posts

Posted - 2012-03-23 : 14:32:27

Hello all. Can someone please explain to me what's the JOIN from the codes below?

Select *
FROM hr_emp h
JOIN
FROM sl_emp s
WHERE h.id = s.id

What kind of JOIN is this? It doesn't specify INNER, LEFT, RIGHT, or OUTER JOIN?

Thank you.

siumui

X002548
Not Just a Number

15586 Posts

Posted - 2012-03-23 : 14:48:26
Well it's suppose to be an inner join, where rows MUST exist in each table..but your syntax is malformed

Select *
FROM hr_emp h
INNER JOIN sl_emp s
ON h.id = s.id



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-03-23 : 19:59:24
i'm sure whatever you posted is not working code...especially in SQL Server

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-03-23 : 21:16:32
I know of NO DB Platform with that syntax

It's a typo



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -