faqts : Computers : Databases : MySQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

105 of 159 people (66%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Does MySQL support "SELECT...INTERSECT..." statement? If not, what are my other options in order to implement the same function?

Feb 13th, 2008 00:29
dman, syberchic, Jo Chua, http://sturly.com


These functions are on the MySQL todo list;
UNION, MINUS, INTERSECT and FULL OUTER JOIN. (Currently only LEFT OUTER 
JOIN is supported) 
I can suggest either researching other db's (for example postgreSQL). 
Or writing your sql with a clauses equating the fields
eg. " from table1, table2 where table1.field1 = table2.field1 and 
table1.field2 = table2.field2 "
www.mysql.com/documentation/mysql/bychapter/manual_TODO.html