如何删除我的表中的身份而不会丢失我的数据 [英] how to remove identity in my table without loss my data

查看:62
本文介绍了如何删除我的表中的身份而不会丢失我的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个包含96条记录的表,而且标识列名是Room_Id,我需要删除表中的自动增量而不删除该表,

我的代码是



hi ,
I have table which contains 96 records , and identity column name is Room_Id , and i need to remove that auto increment in my table without drop that table ,
my code is

set identity_insert mytable_name off





任何人都可以帮帮我,



can anyone help me pls,.

推荐答案

打开SQL Server Management工作室,只需通过表设计器关闭RoomId列的IsIdentity(设置为false)。

- 右键单击​​一个表

- 选择设计

- 选择列

- 滚动中间的寻找IsIdentity房产的房产总览

- 设为false

- 你做完了:)



它将完成所需的一切,而不必担心失去任何东西。 (做备份以防万一:))





如果这有帮助请花时间接受解决方案。谢谢。
Open SQL Server Management studio and simply turn IsIdentity off (set to false) for RoomId column through table designer.
- Right click a table
- select Design
- select the column
- scroll about the middle of the property list looking for IsIdentity property
- Set it to false
- You're done :)

It will do everything needed without you having to worry about loosing anything. (do a backup just in case :) )


If this helps please take time to accept the solution. Thank you.


这篇关于如何删除我的表中的身份而不会丢失我的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆