From several table VS inner join
up vote
0
down vote
favorite
I can't get the point.
What is the difference between
select e.empid
from employee_table e
inner join customer_table c
on deref(c.infos).personid = deref(e.infos).personid
order by e.empid;
and
select e.empid
from employee_table e, customer_table c
where deref(c.infos).personid = deref(e.infos).personid
order by e.empid;
The results are the same.
Is one faster to perform than the other ?
When to use an inner join when we can simply select from multiple table ?
sql inner-join
add a comment |
up vote
0
down vote
favorite
I can't get the point.
What is the difference between
select e.empid
from employee_table e
inner join customer_table c
on deref(c.infos).personid = deref(e.infos).personid
order by e.empid;
and
select e.empid
from employee_table e, customer_table c
where deref(c.infos).personid = deref(e.infos).personid
order by e.empid;
The results are the same.
Is one faster to perform than the other ?
When to use an inner join when we can simply select from multiple table ?
sql inner-join
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I can't get the point.
What is the difference between
select e.empid
from employee_table e
inner join customer_table c
on deref(c.infos).personid = deref(e.infos).personid
order by e.empid;
and
select e.empid
from employee_table e, customer_table c
where deref(c.infos).personid = deref(e.infos).personid
order by e.empid;
The results are the same.
Is one faster to perform than the other ?
When to use an inner join when we can simply select from multiple table ?
sql inner-join
I can't get the point.
What is the difference between
select e.empid
from employee_table e
inner join customer_table c
on deref(c.infos).personid = deref(e.infos).personid
order by e.empid;
and
select e.empid
from employee_table e, customer_table c
where deref(c.infos).personid = deref(e.infos).personid
order by e.empid;
The results are the same.
Is one faster to perform than the other ?
When to use an inner join when we can simply select from multiple table ?
sql inner-join
sql inner-join
edited Apr 13 '17 at 18:46
asked Apr 13 '17 at 18:32
Guilhem Fry
607
607
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Because these two queries are equivalent. But the first one is using ANSI-92 style joins and the second is using ANSI-89 style joins. The newer join syntax is less prone to error and it has been around for 25 years now.
You should always use the ANSI-92 style joins.
- Bad habits to kick : using old-style JOINs
I edited the post for e.supervisor. Thank you for the advice. Does it run exacltly the same in the sql engine ?
– Guilhem Fry
Apr 13 '17 at 18:47
Well I don't know which sql engine but these are ANSI standards and nearly every DBMS follows these pretty close. Certainly on joins all of the major ones will be identical.
– Sean Lange
Apr 13 '17 at 18:48
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Because these two queries are equivalent. But the first one is using ANSI-92 style joins and the second is using ANSI-89 style joins. The newer join syntax is less prone to error and it has been around for 25 years now.
You should always use the ANSI-92 style joins.
- Bad habits to kick : using old-style JOINs
I edited the post for e.supervisor. Thank you for the advice. Does it run exacltly the same in the sql engine ?
– Guilhem Fry
Apr 13 '17 at 18:47
Well I don't know which sql engine but these are ANSI standards and nearly every DBMS follows these pretty close. Certainly on joins all of the major ones will be identical.
– Sean Lange
Apr 13 '17 at 18:48
add a comment |
up vote
1
down vote
accepted
Because these two queries are equivalent. But the first one is using ANSI-92 style joins and the second is using ANSI-89 style joins. The newer join syntax is less prone to error and it has been around for 25 years now.
You should always use the ANSI-92 style joins.
- Bad habits to kick : using old-style JOINs
I edited the post for e.supervisor. Thank you for the advice. Does it run exacltly the same in the sql engine ?
– Guilhem Fry
Apr 13 '17 at 18:47
Well I don't know which sql engine but these are ANSI standards and nearly every DBMS follows these pretty close. Certainly on joins all of the major ones will be identical.
– Sean Lange
Apr 13 '17 at 18:48
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Because these two queries are equivalent. But the first one is using ANSI-92 style joins and the second is using ANSI-89 style joins. The newer join syntax is less prone to error and it has been around for 25 years now.
You should always use the ANSI-92 style joins.
- Bad habits to kick : using old-style JOINs
Because these two queries are equivalent. But the first one is using ANSI-92 style joins and the second is using ANSI-89 style joins. The newer join syntax is less prone to error and it has been around for 25 years now.
You should always use the ANSI-92 style joins.
- Bad habits to kick : using old-style JOINs
edited Nov 10 at 22:04
Aaron Bertrand
206k27358401
206k27358401
answered Apr 13 '17 at 18:44
Sean Lange
24.2k21735
24.2k21735
I edited the post for e.supervisor. Thank you for the advice. Does it run exacltly the same in the sql engine ?
– Guilhem Fry
Apr 13 '17 at 18:47
Well I don't know which sql engine but these are ANSI standards and nearly every DBMS follows these pretty close. Certainly on joins all of the major ones will be identical.
– Sean Lange
Apr 13 '17 at 18:48
add a comment |
I edited the post for e.supervisor. Thank you for the advice. Does it run exacltly the same in the sql engine ?
– Guilhem Fry
Apr 13 '17 at 18:47
Well I don't know which sql engine but these are ANSI standards and nearly every DBMS follows these pretty close. Certainly on joins all of the major ones will be identical.
– Sean Lange
Apr 13 '17 at 18:48
I edited the post for e.supervisor. Thank you for the advice. Does it run exacltly the same in the sql engine ?
– Guilhem Fry
Apr 13 '17 at 18:47
I edited the post for e.supervisor. Thank you for the advice. Does it run exacltly the same in the sql engine ?
– Guilhem Fry
Apr 13 '17 at 18:47
Well I don't know which sql engine but these are ANSI standards and nearly every DBMS follows these pretty close. Certainly on joins all of the major ones will be identical.
– Sean Lange
Apr 13 '17 at 18:48
Well I don't know which sql engine but these are ANSI standards and nearly every DBMS follows these pretty close. Certainly on joins all of the major ones will be identical.
– Sean Lange
Apr 13 '17 at 18:48
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f43399395%2ffrom-several-table-vs-inner-join%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown