如何删除数据库中的数据 [英] how delete data in database
本文介绍了如何删除数据库中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
之后我需要为该单元格输入新值。(根据ID_No是16751)
嗯使用vb.net 2010和sql server。
请帮助我。对于糟糕的英语。谢谢
解决方案
你可以使用
DELETE FROM mytable WHERE ID_no = 16751然后插入新记录,或者更好地只使用UPDATE命令,并指定新值:
UPDATE mytable SET mycol ='new value'WHERE ID_no = 16751
尝试将标记列值更新为null
更新Table1 set marks = null其中ID_No = 16751
然后使用新值更新标记列值
更新Table1 set marks ='NewValue'WHERE ID_No = 16751
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
解决方案
You could use
DELETE FROM mytable WHERE ID_no=16751then 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
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
这篇关于如何删除数据库中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文