I am having an issue where I am working on table aliases and ran into a weird issue. I am able to use null as column name when I am not using table alias, but if I use a table alias I run into issues.
works!
select top 10 eid, null as emp_no from employee
does not work!!
select top 10 e.eid, null as e.emp_no from employee e
Is there a way out? I am running into an issue when I join with another table.
Trying to make it work !
select top 10 e.eid, null as e.emp_no, ed.desgination from employee e
inner join employee_designations ed on e.eid=ed.eid
Error
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '.'.