Hot answers tagged


Not sure about mysql but in mssql like '%val' is a full scan Multiple keywords in a varchar(200) column is probably not the best design. Spit the keyswords into separate words into a separate table with a FK back to company.ID. So each word would be a row. Then you can search on keyword.value = 'xxx' and use an index.


SQL (Structured Query Language) is a language used to communicate with a database. MySQL is a particular flavour of SQL, which supports a slightly different set of commands to other database types (while still having a lot of similarities, and some commands in common). Despite the name, it's more than just a "query language": it is actually the entire ...


You can do it by running the following query: SELECT a.sender,a.status,a.type,c.p_id,c.p_name, FROM a INNER JOIN b ON a.sender=b.sender INNER JOIN c ON b.p_id = c.p_id WHERE a.status='approved' AND'current';

Only top voted, non community-wiki answers of a minimum length are eligible