SQL编辑只读单元格可写

SQL编辑只读单元格可写

问题描述:

你好

如何将SQL Cell从只读编辑为可写?

Hello
How can i edit SQL Cell from read only to writable?

你不能。

首先,因为没有SQL Cell这样的东西。

自定义应用程序可能会因为其他原因而阻碍您编辑值,但从较低级别的角度来看(比如使用SQL Management Studio时),您应该注意以下基础:

一个表,甚至更少的查询结果与excel表相当。

默认情况下,所有表字段都是可写的,如果您拥有适当的权限 - 在表上,或甚至字段级别 [ ^ ]。字段可能有一些约束,因此并非所有值都可以被接受,但这是另一个主题。

有计算字段,按照定义只读。

如果你有一个更复杂的查询,结果将不可编辑,因为你看到的结果和底层表/表之间不再有任何明确的反向链接。因此,无法持续编辑网格中的值 - 这也将导致只读单元格。
You can not.
First of all, because there is no such thing as SQL Cell.
A custom application might hinder you in editing a value for other reasons too, but from lower level point of view (like when using SQL Management Studio), there are basics you should be aware of:
A table, and even less a query result is comparable to an excel sheet.
By default all table fields are "writable", if you have the proper rights given - on table, or even field level[^]. The fields might have some constraints, thus not all values might be accepted, but that is an other topic.
There are calculated fields, which are by definition read-only.
If you have a little bit more complicated query, than the result won't be editable, because there won't be any clear reverse link anymore between the result you see and the underlying table/tables. Thus editing the value in the grid could not be persisted - this will also lead to read-only cells.