如何将数据库中某个字段的值更新为空值?

SqlParameter[] parameters = new SqlParameter[0];

SqlParameter para_cs_key = new SqlParameter("@sort", SqlDbType.Int, 4);
            para_cs_key.Value = DBNull.Value;
            parameters[0] = para_cs_key;

string sql = "UPDATE TABLENAME SET sort=@sort WHERE where......";

posted @ 2008-10-08 09:27  itecho  阅读(3356)  评论(0编辑  收藏  举报