select y.id,y.agent_id,y.phone_no,y.user_id,z.cname as user_name from rush_user_agent_huawei y LEFT JOIN AOS_RMS_USER z ON y.USER_ID = z.CGUID where $like(z.cname,username) and $like(y.agent_id,agentId) and $like(y.phone_no,phoneNo) insert into rush_user_agent_huawei (id,user_id,agent_id,phone_no) values ({id},{userId},{agentId},{phoneNo}) delete from rush_user_agent_huawei where id = {id} update rush_user_agent_huawei set agent_id = {agentId}, phone_no = {phoneNo} where id = {id} select y.user_id,z.cname as user_name from rush_user_agent_huawei y LEFT JOIN AOS_RMS_USER z ON y.USER_ID = z.CGUID where y.user_id !='1'