Let’s say I have the following SQL query:
SELECT *
FROM employee
INNER JOIN department ON employee.EmpID = department.EmpID
I wanted to ask, why I am getting two EmpID columns, and how can I get only one of those, preferably the first.
I’m using SQL server
Be precise and specify which columns you need instead of using the astrisk to select all columns.