It can be done with a where clause.
Used to do it like this years ago, I believe before MS SQL Server 2000 come out.
select
FIRST_NAME,
LAST_NAME,
AGE,
ADDRESS,
SALARY,
DEPT_NAME.DEPT_ID,
DEPT_NAME
from EMP_DETAILS, DEPT_NAME
where EMP_DETAILS.DEPT_ID = DEPT_NAME.DEPT_ID
But I recommend to use join.
select
FIRST_NAME,
LAST_NAME,
AGE,
ADDRESS,
SALARY,
DEPT_NAME.DEPT_ID,
DEPT_NAME
from EMP_DETAILS
inner join DEPT_NAME
on EMP_DETAILS.DEPT_ID = DEPT_NAME.DEPT_ID