Hi,
I'm relatively new to SQL and databases in general, and I have a question about linking data between 2 tables. I have one table which lists department names and each department has its own id (primary key) it looks like this:
id int8
name varchar(50)
I have another table which stores data from user input. One of the columns is the department id.
task_id int8
.
.
.
department_id int8 <- this would map to the id column in the previous table.
Is it possible to link the department id column in the user input table to the other table so that when I run a query, the department name will be returned instead of the id?
Thanks!
-Mike
I'm relatively new to SQL and databases in general, and I have a question about linking data between 2 tables. I have one table which lists department names and each department has its own id (primary key) it looks like this:
id int8
name varchar(50)
I have another table which stores data from user input. One of the columns is the department id.
task_id int8
.
.
.
department_id int8 <- this would map to the id column in the previous table.
Is it possible to link the department id column in the user input table to the other table so that when I run a query, the department name will be returned instead of the id?
Thanks!
-Mike