IntelliJ Java IDE
The moose likes Oracle/OAS and the fly likes update query feasible solution Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Reply Bookmark "update query feasible solution" Watch "update query feasible solution" New topic
Author

update query feasible solution

rama rajesh
Greenhorn

Joined: Jun 22, 2010
Posts: 28
My Requirement is updating the emp table, sal column

if sal>=2000 and <3000 add 2000
if sal>=3000 and <4000 add 3000
if sal>=4000 and <5000 add 5000

you can do this in many ways.but what is the feasible solution?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 23635

How many ranges do you have? If just the thre, I would use three update statements? If a lot, I would use a stored procedure.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Certs: SCEA Part 1, Part 2 & 3 & Core Spring 3, OCAJP
 
 
subject: update query feasible solution
 
Threads others viewed
querying
SQLQuery
Best Way to Edit a Byte Array
Get Maximum sal from emp table
How to pass arraylist in methods?
developer file tools