x

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.

more ▼

asked Jan 29, 2010 at 03:13 AM in Default

avatar image

Nani
232 13 13 16

(comments are locked)
10|1200 characters needed characters left

3 answers: sort voted first

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

more ▼

answered Jan 29, 2010 at 03:43 AM

avatar image

Nitin 3
26 2 1

(comments are locked)
10|1200 characters needed characters left
more ▼

answered Jan 29, 2010 at 05:42 AM

avatar image

Fatherjack ♦♦
43.8k 79 101 118

(comments are locked)
10|1200 characters needed characters left

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

more ▼

answered Jan 31, 2010 at 08:09 PM

avatar image

Rob Farley
5.8k 16 22 28

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x2034
x1095
x163

asked: Jan 29, 2010 at 03:13 AM

Seen: 1289 times

Last Updated: Jan 31, 2010 at 08:10 PM

Copyright 2018 Redgate Software. Privacy Policy