Natural join in SQL Server

Is there any support for natural joins in recent Microsoft SQL Server editions? Or is there a good alternative for making SQL Server work out the predicates that would have been in the ON clauses based on the referential integrity?

  • Is there an equivalent to SHA1() in MS-SQL?
  • Add SQL query options to NHibernate query
  • SSIS parallel processing foreach loop
  • How does the SQL Server engine store and handle varchar(MAX) vs varchar(n)?
  • plastic scm Trying to import rep_1 from one installation to another
  • Group table into 15 minute intervals
  • How can I use single quote inside sql command?
  • How to Troubleshoot Intermittent SQL Timeout Errors
  • What can happen as a result of using (nolock) on every SELECT in SQL Server?
  • Filestream in Sql Server 2008 Express
  • Conditional JOIN in SQL Server
  • How to retrieve column data from an MSSQL Query?
  • 3 Solutions collect form web for “Natural join in SQL Server”

    No, and thank the lucky stars

    I can’t believe that you’d want the engine to guess the JOIN for you

    Related links:

    • SQL Server – lack of NATURAL JOIN / x JOIN y USING(field)
    • is NATURAL JOIN any better than SELECT FROM WHERE in terms of performance ?

    Edit, to explain why

    • The JOIN (whether USING or ON) is clear and explicit
    • I should be able to name my columns for the entity stored in the table, without worrying about what a column is called in another table, without NATURAL JOIN side effects

    I wouldn’t expect to see it any time soon. A Connect suggestion from 2006 has very little info other than:

    Thanks for your feedback. We will look into your request for one of the upcoming releases.

    And has only received ~30 upvotes

    MS SQL does not support natural join, neither join using (). You have to explicitly write down all your attributes used in the join.

    If the datamodel changes, you have to change all “natural join” written by hand and make sure your join condition is ok again.

    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.