gpt4 book ai didi

sql-server - 修改SSMS网格中的binary(1)列

转载 作者:行者123 更新时间:2023-12-02 23:38:27 24 4
gpt4 key购买 nike

以下是当我尝试修改/插入 10binary(1) 列时出现的错误:

Invalid value for cell (row 4, column 5).
The changed value in this cell was not recognized as valid.
.Net Framework Data Type: Byte[]
Error Message: You cannot use the Result pane to set this Field data to values other than NULL.

Type a value appropriate for the data type or press ESC to cancel the change.

最佳答案

这就是二进制字段的方式。您必须编写一条更新语句来修改值,或者编写一条插入语句来添加带有值的行。

如果您的列只能包含值 0 或 1,您应该使用 bit反而。 bit 列可以直接在 SQL Server Management Studio 的编辑网格中修改。 binary(1) 可以保存值 0x000xFF

来自Working with Data in the Results Pane

Values for columns with a binary data type will have NULL values by default. These values can't be changed in the Results pane.

关于sql-server - 修改SSMS网格中的binary(1)列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18036745/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com