Home > Mobile >  How to select multiple id's with sql query
How to select multiple id's with sql query

Time:08-17

enter image description here

I want to select all skill_id where job_id equals = 1 , is there a way around this using a simple sql query ?

in this example : i want sql to return 1 and 2 as skill_id thanks

CodePudding user response:

It's a simple SQL query, and it can be done as follows:

SELECT skill_id 
FROM table_name 
WHERE job_id = 1;

You will get your 2 values as a result.

CodePudding user response:

You can do it as follows :

SELECT DISTINCT skill_id
FROM table_name 
WHERE job_id = 1;
  • Related