SQL Server Performance

What does "Three-part and four-part column references in SELECT list" mean?

Discussion in 'Getting Started' started by lcerni, Apr 4, 2008.

  1. lcerni New Member

    With regards to deprecation, what does "Three-part and four-part column references in SELECT list" mean? Does this mean that if you have a Linked Server that you will not be able to code the following ---> [Instance Name].[Database Name].dbo.[Table Name] ?
    Category Deprecated feature Replacement Feature name Feature ID
    Transact-SQL Three-part and four-part column references in SELECT listTwo-part names is the standard-compliant behavior.More than two-part column name
  2. Greg Larsen New Member

    I'm going to guess it means you can't do this anymore:select master.sys.objects.name from master.sys.objects;
    instead you will have to do one of these: select
    objects.name from master.sys.objects;select
    name from master.sys.objects;
  3. Adriaan New Member

    For ease of coding and improved readability of code in any version of SQL Server, use aliases for your two- and three-part object names.
    The reason why you should always use two-part object names is that this improves the chance of SQL finding an appropriate execution plan in cache (because if the owner is not mentioned, then each time SQL must evaluate which object is the intended one, before executing).
    select mso.name from master.sys.objects mso

Share This Page