Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
221 views
in Technique[技术] by (71.8m points)

sql - 如何在SQL Server Management Studio中将列值设置为NULL?(How do I set a column value to NULL in SQL Server Management Studio?)

如何清除单元格中的值并使其为NULL?

  ask by Zack Peterson translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I think @Zack properly answered the question but just to cover all the bases:

(我认为@Zack正确回答了这个问题但只是为了涵盖所有基础:)

Update myTable set MyColumn = NULL

This would set the entire column to null as the Question Title asks.

(如问题标题所示,这会将整个列设置为null。)

To set a specific row on a specific column to null use:

(要将特定列上的特定行设置为null,请使用:)

Update myTable set MyColumn = NULL where Field = Condition.

This would set a specific cell to null as the inner question asks.

(当内部问题要求时,这会将特定单元格设置为null。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...