Heya: > HI > Does mysql support function EXIST
No. It doesn't support subselects before 4.1 either. > mysql> select * from arcdata d > -> WHERE year='2003' AND semester='1' > -> AND EXIST (SELECT * FROM arcdata_unitCodes u > -> WHERE u.idnum = d.idnum AND u.semester=d.semester AND u.year=d.year > -> AND unitcode LIKE '433%') > -> limit 1 > -> ; > ERROR 1064: You have an error in your SQL syntax near '(SELECT * FROM > arcdata_unitCodes u > WHERE u.idnum = d.idnum A' at line 3 > > Try to select the student who are atleast doing one computer sciencs > subject (433123, 433252...) You'll have to rewrite your query using an inner join...not hard. Peter <^_^> --------------------------------------------- Peter Grigor Hoobly Classified Ads http://www.hoobly.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php