SQL Server数据库查询删除和插入问题 [英] SQL Server database query Delete and Insert question

查看:172
本文介绍了SQL Server数据库查询删除和插入问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个SQL数据库,其中有一个列,其主键为"id",数据类型为BigInt

当我使用查询来删除和插入东西时.它会继续增加ID号.

我担心如果插入和删除内容1000次,最终会使ID号超出Bigint边界.这可能吗?

如果有可能我想知道是否每次都可以删除一个项目,它将把所有的数据/ID号移到它前面以填充缺失的位置.有点类似于您对数组所做的事情.

I have an SQL Database which has a column with the primary key "id" with data type BigInt

When I use the query to delete and insert things. it continues to increment the id number.

I am worried about if I insert and delete things 1000s of times, that it would eventually have the id number go off Bigint boundaries. Is this possible?

If it is possible I want to know if I could delete an item each time, it would move all the data/id number ahead of it to fill in the missing spot. Kind of similar to what you have to do to an array.

推荐答案

" id号码超出Bigint边界.这可能吗?"

当然是-尽管要花点时间-如果我们当中有人还在,我会感到很惊讶:)

最好的问候
Espen Harlinn
"I am worried about if I insert and delete things 1000s of times, that it would eventually have the id number go off Bigint boundaries. Is this possible?"

It certainly is - it''ll take a while though - I''ll be quite surprised if any of us is still around :)

Best regards
Espen Harlinn


bigint的大小为8个字节,这意味着最大值为9,223,372,036,854,775,807.我想你会没事的.
A bigint is 8 bytes in size which means you will have a max value of 9,223,372,036,854,775,807. I think you''ll be ok.


Bigint大小是-2^632^63-1.您距离这里很远.不用担心.
Bigint size is -2^63 through 2^63-1. You are quite far away to reach here. There is no worry about it.


这篇关于SQL Server数据库查询删除和插入问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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