August 20, 2010 at 12:37 pm
Yes... I know what the preferred syntax of doing a CROSS JOIN is but can anyone show me a link to a Microsoft document that says the following form of a CROSS JOIN is being deprecated?
SELECT whatever
FROM sometableA AS a1,
sometableA AS a2
The reason why I'm asking is that I've seen a large number of posts that suggest that the syntax above has been deprecated and I just can't find it on an official deprecation list anywhere... heh... especially since it IS one of my favorite joins.
Thanks for the help, folks.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 20, 2010 at 12:44 pm
Sure don't see that in R2 BOL, and you'd think that would be the most official list.
August 20, 2010 at 1:06 pm
CROSS JOIN
Specifies the cross-product of two tables. Returns the same rows as if no WHERE clause was specified in an old-style, non-SQL-92-style join.
In Deprecated Database Engine Features, it does list the old-style outer join *=/=* as deprecated. Nothing in there about the old-style cross-join syntax being deprecated or going away in a future version.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
August 20, 2010 at 1:14 pm
I don't think that the above syntax can be deprecated. Not unless they also deprecate any form of predicates comparing two tables in the where clause (and that would be near-impossible)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 20, 2010 at 1:18 pm
GilaMonster (8/20/2010)
I don't think that the above syntax can be deprecated. Not unless they also deprecate any form of predicates comparing two tables in the where clause (and that would be near-impossible)
Exactly part of what I was thinking. If that form of syntax when away, there'd be a whole lot of trouble with correlated subqueries CROSS APPLY.
Thanks, Gail.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 20, 2010 at 1:21 pm
jeff.mason (8/20/2010)
Sure don't see that in R2 BOL, and you'd think that would be the most official list.
I've heard that the old "equi-join" format of using commas for Inner and Cross joins is no longer documented in BOL but that it's never been deprecated... at least not in the 3 (2k5, 2k8, 2k8R2) deprecation lists I've seen from MS. And from what I'm thinking and Gail came right out and said, I don't believe they'll ever be able to deprecate it.
Heh... just think... they've created an undocumented set of features that they probably won't ever be able to get rid of.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 20, 2010 at 1:25 pm
WayneS (8/20/2010)
In BOL (From Clause):CROSS JOIN
Specifies the cross-product of two tables. Returns the same rows as if no WHERE clause was specified in an old-style, non-SQL-92-style join.
In Deprecated Database Engine Features, it does list the old-style outer join *=/=* as deprecated. Nothing in there about the old-style cross-join syntax being deprecated or going away in a future version.
Thanks, Wayne. Yeah... those are the very lists (and their links) I've been reading letter by letter. The old-style outer join was first deprecated way back in 2k5 (IIRC), but I've never seen anything on tyhe old equi-join in a WHERE clause. Like Gail said, I don't think such a deprecation will be possible without changing a whole lot of other stuff.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 21, 2010 at 9:39 am
Thanks for the help, folks. I just wanted to make sure I wasn't missing something in the deprecation lists. I appreciate your time.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy