---
title: "C#空值和SQL SERVER中的空值问题"
author: "jeelee"
date: "2016-10-14T23:56:36Z"
tags: []
categories: ["Web前端"]
slug: "c-sql-server"
draft: false
lastmod: "2016-10-14T23:56:36Z"
id: 2330738
url: "https://jeelee.iteye.com/blog/2330738"
---

如果将C#中的null插入SQL SERVER中,那么在表中的体现值是NULL
![](

)

在从数据读取时,user.Description = (string)reader;会报错

因此,在向SQL SERVER数据库写入数据时,如果是空值,则写入 <span style="color:red">""</span>