1. Oracle:
"MERGE into MHGROUP.proj_access m using dual on " + "(PRJ_ID = '" + WS_PrjID + "' AND USER_GP_ID = '" + smrIDs[i] + "')" + "when not matched then " + "insert (PRJ_ID,OBJECT_TYPE,USER_GP_ID,ACCESS_RIGHT) " + "values ('" + WS_PrjID + "','U','" + smrIDs[i] + "','" + accessLevel + "')" + "when matched then " + "update set ACCESS_RIGHT = '" + accessLevel + "'";
2. MSSQL:
insert into customer_info(company_name,customerid,status) Select 'abc','CD',1 Where not exists(select * from customer_info where cid=2)