Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have database. there have Table 1 and it have ID_No, Date, Month, Marks columns. i need delete only marks cell relevant to the ID_No is "16751"
after that i need enter new value to that cell.(according to ID_No is "16751")
um using vb.net 2010 and sql server.
pls help me.sorry for the bad english. Thanks
Posted
Updated 16-Aug-13 10:36am
v2

You could use
DELETE FROM mytable WHERE ID_no=16751
then insert a new record, or better just use an UPDATE command instead, and specify the new values:
UPDATE mytable SET mycol='new value' WHERE ID_no=16751
 
Share this answer
 
Trying to update marks column value as null
update Table1 set marks=null where ID_No=16751

And then update the marks column value with your new value
update Table1 set marks='NewValue' WHERE ID_No=16751
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900