Question: I am just at starting levels in DB usage and have 2 basic questions

1. I have a generic UPDATE stored proc which updates all columns of a table.

But i need to make it conditional wherein it does not SET when the parameter is NULL.

Usage: I want to use this as a single SP to UPDATE any subset of columns, the caller from C# will fill in corresponding parameter values and leave other parameters NULL.

2 

In case of , "UPDATE selected records" do i need to use locking inside stored proc ?

Why ? Isn't the operation in itself locked and transactional ?

I find the same question come up when i need to UPDATE selected(condition) records and then Return updated records.

Answer: 
You need:

* first to declare the different JRE in your Eclipse: See "[Eclipse - no Java (JRE) / (JDK) … no virtual machine…](https://stackoverflow.com/questions/2030434/eclipse-no-java-jre-jdk-no-virtual-machine/2843837#2843837)"
* then to add the right JRE in your project settings (see this [blog post for instance](http://www.upgradingdave.com/unsupported-major-minor-version-49-what-the-hell-does-that-mean))

![alt text](https://i.stack.imgur.com/Kbk1J.gif)

> 
> The default JRE is shown with a check mark and is used by new eclipse projects unless the project specifically overrides the value.  
> 
> **So the next step is to check which JRE the current project is using**. 
> 
> 
> * Right click the project and choose "properties".
> * Select "Java Build Path" and then click the tab labeled "Libraries". You should see an entry like "JRE System Library [version]".  
> 
>  To change the JRE version,
> 	+ highlight the entry and click "Remove".
> 	+ Then click "Add Library...". Choose "JRE System Library".  
> 	
> 	 If you choose "Workspace Default", the project will use the JRe defined under "Windows -> Properties" as explained above.  
> 	
> 	 You may also specify an alternate JRE located somewhere on your file system, or choose an embedded execution environment provided by Eclipse.
> 
> 
>
you can configure VM in [eclipse.ini](http://wiki.eclipse.org/Eclipse.ini) file.