Feb 12, 2013

The objects "" and "" in the FROM clause have the same exposed names. Use correlation names to distinguish them.


If we will execute following sql query in sql server:

SELECT NULL,NULL FROM sys.objects  ,sys.objects

We will get error message like:

The objects "sys.objects" and "sys.objects" in the FROM clause have the same exposed names. Use correlation names to distinguish them.

Cause: In FROM clause if we getting data from same source table then we must have to distinguish all tables by using table alias.

Solution :

SELECT NULL,NULL
FROM sys.objects One  ,sys.objects Two

1 comment:

  1. hi there,:) i have gone through your posts, they are excellent, hey i just need your help in one thing, will you please provide me with your contact details.

    ReplyDelete