Calling the java method from an SQL database is not a standard function. An Informix database can call a shell script from a stored procedure, but I do not know about this function in MySQL (I am not a mysql expert).
The closest thing that works with all databases will have a thread and periodic polling of the database for new records.
SELECT * FROM studentinfo WHERE id > last_seen_id
Or you can use a timestamp:
SELECT * FROM studentinfo WHERE create_date >= last_seen_create_date
In this case, you will have to filter duplicate lines that are already loaded from the previous run.
source share