We have a database application project (.net ,Ado.Net , Entity Framework, Visual Studio Windows Form ) that complteley use Stored procedures so the developers call the stored and pass the required parameters to it ...
Am working on creating these Stored Proceders.... every thing is good for Delete , Select , Insert Processess But the problem in Update Procedure for the follwoing reason:-
suppose i have a table with 30 Columns
so i create the following Sp
Create Proc UpdateMyTable
, Col30 nvarchar(30)
UPDATE mytable SET Col1=@Col1 ,Col2=@Col2 ,Col3=@Col3 ,...........Col30=@Col30
The problem is in all cases it supposed that the user will change/Update ONLY Two or Three column in specific row
So the stored will take All parameters even for the UNCHANGED column values... then update the table
in toher words the Client App will pass the all values to stored procedures even the user Just change the column 3 value
I dont know how to handle this in stored Procedure to only update the changed values to be more efficient for performance.