title: Translating a QueryExpression into SQL: what's a Natural join?
body: <p>I am trying to translate a QueryExpression that is in some existing code into a T-SQL select statement.</p>
  
  <p>I've run across the following statement and I'm having trouble understanding what they mean by a Natural Join:</p>
  
  <pre><code>linkEntity1.JoinOperator = JoinOperator.Natural;
  </code></pre>
  
  <p>Would this be equivalent to an Inner Join in T-SQL?  Googling has not been much help.</p>
  
  <p>Here's the rest of the QueryExpression Code:</p>
  
  <pre><code>QueryExpression query = new QueryExpression();
  
  query.EntityName = "showinfo";
  
  ColumnSet columns = new ColumnSet();
  columns.Attributes = new String[] { "company" };
  query.ColumnSet = columns;
  
  query.Criteria = new FilterExpression();
  query.Criteria.FilterOperator = LogicalOperator.And;
  
  ConditionExpression condition1 = new ConditionExpression();
  condition1.AttributeName = "company";
  condition1.Operator = ConditionOperator.NotNull;
  query.Criteria.Conditions = new ConditionExpression[] { condition1 };
  
  LinkEntity linkEntity1 = new LinkEntity();
  linkEntity1.JoinOperator = JoinOperator.Natural;
  linkEntity1.LinkFromEntityName = "show";
  linkEntity1.LinkFromAttributeName = "showid";
  linkEntity1.LinkToEntityName = "showintegration";
  linkEntity1.LinkToAttributeName = "showcode";
  
  linkEntity1.LinkCriteria = new FilterExpression();
  linkEntity1.LinkCriteria.FilterOperator = LogicalOperator.And;
  
  ConditionExpression condition2 = new ConditionExpression();
  condition2.AttributeName = "showend";
  condition2.Operator = ConditionOperator.Null;
  
  linkEntity1.LinkCriteria.Conditions = new ConditionExpression[] { condition2 };
  query.LinkEntities = new LinkEntity[] { linkEntity1 };
  </code></pre>