Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 SQL ce,我想将数据库表的列更新为行号,如下所示
更新 mytable set column=Row_Number()
请建议我如何在 SQL ce 查询中实现这一点。
您可以使用 IDENTITY 列(必须是 INT 或 bigint 类型),它将根据需要递增:
ALTER TABLE myTable ADD MyID INT IDENTITY (100,1)