Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Miscellaneous > Oracle Merge St...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 6906 of 7280
Post > Topic >>

Oracle Merge Statement -sample query

by idey <dey.indranil@[EMAIL PROTECTED] > May 20, 2008 at 02:59 AM

Hi All,
I have a simple question but i am in a fix coz of it.
This is regarding Oracle Merge statement.

The question is:

I have a table say

Employee
- Name varchar2(20)
- ID pk number
- salary number

I want to check whether ID = 20 exists or not. If yes, then update
salary = salary +10000;
else insert the row with default values.

Can someone give me the SQL for this? I have tried all the seemingly
normal approaches.

Regards,
Indranil.
 




 7 Posts in Topic:
Oracle Merge Statement -sample query
idey <dey.indranil@[EM  2008-05-20 02:59:26 
Re: Oracle Merge Statement -sample query
"fitzjarrell@[EMAIL   2008-05-20 05:39:56 
Re: Oracle Merge Statement -sample query
Frank van Bortel <fran  2008-05-21 14:31:30 
Re: Oracle Merge Statement -sample query
idey <dey.indranil@[EM  2008-05-22 00:25:06 
Re: Oracle Merge Statement -sample query
Gints Plivna <gints.pl  2008-05-22 07:12:03 
Re: Oracle Merge Statement -sample query
"fitzjarrell@[EMAIL   2008-05-22 09:10:10 
Re: Oracle Merge Statement -sample query
idey <dey.indranil@[EM  2008-05-23 01:30:18 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 0:30:58 CST 2008.