I want sql query for update a record. For example there are 3 columns in my table -
Name , Address, Email
and when I update any one column other columns value should be null without set null to them. Like
Update tbl_Student set Name = 'XYZ' where id = 1
In above case only Name column should update and other column should update by null.
FYI,
As there are two many columns that I need to set null that's why I wanted some kind of query to do that. Like -
ID ADDRESS NAME EMAIL
1 PARK ROAD JOHN john@gmail.com
And I want to update only name and want rest of the fields should be null.Like
Update Table SET NAME = 'NICK' WHERE ID = 1
Then updated output should be -
ID ADDRESS NAME EMAIL
1 NULL NICK NULL