Skip to content

Instantly share code, notes, and snippets.

@shaik2many
Last active August 29, 2015 14:04
Show Gist options
  • Save shaik2many/2d4c5f18d0e340cd7114 to your computer and use it in GitHub Desktop.
Save shaik2many/2d4c5f18d0e340cd7114 to your computer and use it in GitHub Desktop.
oracle merge
merge into tims_idr_agent t
using (select 1 from DUAL) s
on (t.id = p_id AND t.audit_cycle = p_audit_cycle)
when matched then
update set t.name = 'Alan1',t.phone = '-2932x',t.email = 'Alan@v1',t.category = 'Domestic1'
when not matched THEN
INSERT (audit_cycle,ID,NAME,phone,email,category)
VALUES(p_audit_cycle,p_id,p_name,p_phone,p_email,p_category);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment