# Miscellaneous > SQL Scripts >  Use ID to select info from other table

## olleke

I have two tables:

- Employees
 id|name
 1.|Peter
 2.|Andre
 3.|Vincent

- Departments
 id|department|employee
 1   finance  |  2
 2   sales    |  1

I am looking for a query that results the table Departments to show the actual name of the employee instead of a number by using the number (id). 

Please help

----------


## rmiao

Try something like:

select department, e.name as employee from Departments d join Employees e on d.employee = e.id where ...

----------

