Hi team,
Kindly, clarify the below query, i am confused the difference between in and like statements in the mysql.
mysql> select count(id) as tablename from postings where is_active=1 and publish in (2) ;
result -- 38
mysql> SELECT COUNT(*) FROM tablename WHERE is_active=1 and publish like '%2%';
result -- 95
Data in table looks like,
1,2
2,1
1
2
Thanks & Regards,
Prem