Home » SQL & PL/SQL » SQL & PL/SQL » Update statment (Oracle)
Update statment [message #326224] Tue, 10 June 2008 13:32 Go to next message
veparala
Messages: 1
Registered: June 2008
Junior Member
Hi

I have two tables with the followinf data.

Employee1

EmpoyeeNo Name Role salary
111 John SSE 112220
222 rahim SE NULL
333 RAN DEV 583930


Employee2
EmpoyeeNo Name Role salary
111 John DBA 112220
222 rahim SEE 353664
333 RAN DEV 583930
444 rohit ADM 248299

I want to update Employee2 from Employee1. If any input column value has null value, then i don't want to updated that column (i.e keep the value as it is). If input value has not null, then i will updated that colum.

Now my final table (i.e Employee2) will looks like this after updation.

Employee2
EmpoyeeNo Name Role salary
111 John SSE 112220
222 rahim SE 353664
333 RAN DEV 583930
444 rohit ADM 248299

Please let me know the SQL for this updatation.
Re: Update statment [message #326225 is a reply to message #326224] Tue, 10 June 2008 13:42 Go to previous message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Post what you already tried but before please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel
Previous Topic: 32,000 chars + into BLOB
Next Topic: Materialized View
Goto Forum:
  


Current Time: Thu Dec 08 00:34:26 CST 2016

Total time taken to generate the page: 0.16840 seconds