PDA

View Full Version : Problems with "in" statement


ahutatatong
04-28-2003, 01:12 PM
Hi folks,

i have written a programm in java using an oracle database. Now i want to use it at home with a mysql database. The problem is that mysql doesn't support the keyword in . would be nice if somebody could help me.

SELECT * FROM PARTNER p WHERE p.PID in
(select PID FROM LIEFERT where AID ='"+getAid()+"') ";

It's possible that there are more rows than one in the Liefert-table.

raf
04-28-2003, 01:45 PM
Welcome here!

What MySQL version are you using? Subquerys ("sub selects" fro MySQL are only available since MySQL 4.1)
http://www.mysql.com/doc/en/ANSI_diff_Sub-selects.html

ahutatatong
04-28-2003, 02:22 PM
thank you-i have to go to the university now but i think the link you sent me will help me a lot

i just looked at the version 3.23 :)