question

Nani avatar image
Nani asked

problem with joins

Don't we have

  • Natural join,
  • join using(Col_name)
  • join on

statements in sequel server as we have them in oracle?

If so plz state the syntax.

Thanks in advance.

sql-server-2005t-sqljoins
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Nitin 3 avatar image
Nitin 3 answered

In sql server both join can work.

Join without on

select a.name,b.id from tbla aa a,tblb as b where a.id=b.id

Join with on select a.name,b.id from tbla aa a inner join tblb as b on a.id=b.id

try this both will work in any version of sql server 2000/2005/2008

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Fatherjack avatar image
Fatherjack answered
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Rob Farley avatar image
Rob Farley answered

T-SQL doesn't support NATURAL JOIN at all, nor does it support USING(ColName). Sorry...

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.