Perform UPDATE statement only if SELECT statement gives empty set in MySQL
I have a MySQL table like below: create table login_schedule(name varchar(20),emp_id varchar(5),login_time datetime,logout_time datetime); and data insertion looks like below: insert into login_schedule values('Ram','01',now(),now()+interval 30 minute); So, I want to perform a update query only if one select statement gives…