Forum Moderators: open

Message Too Old, No Replies

How to compare entries from different tables

         

adichndr

7:37 pm on Oct 8, 2006 (gmt 0)

10+ Year Member



Each tables(SCHOOL_A;SCHOOL_B;SCHOOL_C;SCHOOL_D;SCHOOL_E) contains :

ID_STUDENT
ID_CHOICE
POINT

Example: If George is listed on Scool_A (1st choice), School_B (2nd choice) and School_C (3rd Choice) then the database should look for his ID_CHOICE. If database found george take School_A as the 1st choice (ID_CHOICE=1) then I want to delete his entry from School_B and School_C.

but if database can't find George 1st choice then databse should go check his 2nd choice, if it is listed then I want database delete his entry from his 3rd choice.

Is it possible to do this with Mysql?

Thanks in advance,