SQL foreign key between two tables

Posted by  Lady Bird Johnson
 1648  View(s)
Ratings:
Rate this:
Hi Expert!

I was wondering if anyone could lead me through this SQL query.

I have two tables CS_JOBS and CS_JOBS_CATEGORY. They both have category_code row which I want to join.

PS: I will use these tables to populate the drop down box in php. 

Thank you!
  1. Re: SQL foreign key between two tables

    Hi Lady!


    Try as following

    SELECT -- what you want to select
    FROM CS_JOBS AS j
    INNER JOIN CS_JOBS_CATEGORY AS c ON j.category_code = c.category_code;

    I hope it helpful for you.

Answer