Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How do update only the column that was updated?

$
0
0

hi friends,

I have the following table structure of an Employee table

Column Name             type
=============================
EmpID                  int
EmpFirstName           char(20)
EmpLastName            char(20)
DOB                    Datetime
AddressL1              char(100)
AddressL2              char(100)

I have a C# application as the client that can search an Employee by ID or name and loads it to the DataGridView control. In it i can modify the his detail. (This is very simsple application to test update)

typically we the user updates a record column we dont update the whole row, we only update the column that was modified by the client app. So assume the user changes the first name and i need the update stored procedure only to update the first name column, How do i do this?

thanks


I use Visual studio 2012 Ultimate and SQL server 2008 developer edition!


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>