Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql field equals multiple values

SELECT ads.*, location.county 
FROM ads
LEFT JOIN location ON location.county = ads.county_id
WHERE ads.published = 1 
AND ads.type = 13
AND ads.county_id IN (2, 5, 7, 9)
Comment

PREVIOUS NEXT
Code Example
Sql :: oracle insert from select 
Sql :: how to login to mysql in homestead 
Sql :: mysql update from n to 100 
Sql :: difference in dates sql 
Sql :: Host ' is not allowed to connect to this MySQL server 
Sql :: do block in postgresql 
Sql :: xml to column sql 
Sql :: alter database datafile maxsize 32g 
Sql :: Failed to process SQL command - ORA-28014: cannot drop administrative user or role 
Sql :: microsoft sql server management studio uppercase shortcut 
Sql :: illuminate database queryexception could not find driver (sql select * from 
Sql :: keys in sql with example 
Sql :: sql not exists 
Sql :: how to declare variable date in mysql 
Sql :: what is top n result in sql 
Sql :: mysql copy row with new id 
Sql :: mariadb cast null to 0 
Sql :: select indexname psql 
Sql :: rename view mysql 
Sql :: MySQL error code 2068 
Sql :: mariadb check constraint example? 
Sql :: mysql shell set time_zone 
Sql :: sqlstate[hy000] [2006] mysql server has gone away laravel 
Sql :: sql queries practice 
Sql :: how to order a union sql 
Sql :: mysql select empty string 
Sql :: sqlite select regex 
Sql :: rename command in sql 
Sql :: mysql view 
Sql :: if mysql UPDATE 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =