小编use*_*107的帖子

Does UPDLOCK guarantee concurrency

I have a table called tblOrderNumber which has 1 row and 1 column. This table stores what the next order number will be for my ecommerce website. It is ABSOLUTELY VITAL that the same order number is not used more than once. Currently the team are using this stored procedure and it seems to work fine:

My question is does UPDLOCK guarantee this? I would have thought a Read Lock is required on the SELECT too (in the unlikely case …

sql-server concurrency locking

8
推荐指数
1
解决办法
2032
查看次数

我应该为每种数据类型设置一列还是存储所有内容的 1 列

我有一个当前看起来像这样的数据库表:

PageField
-Id (Int, PK)
-FieldType (String) Can be Text, Decimal, Integer or Bit
-Value (This stores the value regardless of the FieldType, so it is not strongly typed)
Run Code Online (Sandbox Code Playgroud)

我是否应该删除Value列并将其替换为 4 个单独的列TextValueDecimalValueIntegerValueBitValue吗?

数据类型将设置为相关内容。这意味着在这 4 列的每一行中,第 3 列将是NULL.

database-design eav

1
推荐指数
1
解决办法
892
查看次数

标签 统计

concurrency ×1

database-design ×1

eav ×1

locking ×1

sql-server ×1