I am facing a unique problem in mysql.
I am posting this problem in this section because it says
JDBC + some brushup of SQL.
Firstly i am working on a Apps written in
java & interacts with MySQL.
Heres a table EMPLOYEE
ID , Name
1,qqq
2,www
4,rere
6,gerwwe
7,gegwert
8,gsfdjg;
I have a set of input parameters. These are nothing but id of a table EMPLOYEE_CACHE (1,2,3,4,5,6,7)
I want to write a query such that i get output as 3,5
You must have guessed correctly, i want to sync EMPLOYEE_CACHE with EMPLOYEE. I have code that handles INSERT & UPDATE smoothly. Just want to add something that detects delete in master table and update the cache table
My best shot is it can be done using MINUS in mysql. But again MINUS needs 2 tables to work on. And here i have 1 table and a set of parameters.
How can i form my query here