What will be the Error after executing below query?

select * from employee_master,employee_master;

 Posted by vishalneeraj-24503 on 11/27/2013 | Category: Sql Server Interview questions | Views: 2034 | Points: 40

It will throw an error saying:-

Msg 1013, Level 16, State 1, Line 1
The objects "employee_master" and "employee_master" in the FROM clause have the same exposed names. Use correlation names to distinguish them.

So, to work above query, we have to give Alias name as below:-

Select * from employee_master A,employee_master B;
Then it will execute properly and will give us output.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response