How to do if sqlserver table identity column exceed limited ?
script:
select a.TABLE_NAME,a.COLUMN_NAME,a.DATA_TYPE,
(CASE a.DATA_TYPE when 'int' then 'limited between -2147483648 and 2147483647'
when 'bigint' then 'limited between -9223372036854775808 and 9223372036854775807'
when 'smallint' then 'limited between -32768 and 3,767'
when 'decimal' then 'limited between -10^38 and 10^38 - 1'
END
) as "Description",
c.INCREMENT_VALUE,
c.LAST_VALUE as "current identity"
from INFORMATION_SCHEMA.COLUMNS a inner join
SYS.objects b on a.TABLE_NAME=b.name
inner join SYS.IDENTITY_COLUMNS c on b.object_id=c.object_id
where COLUMNPROPERTY(object_id(a.TABLE_SCHEMA+'.'+a.TABLE_NAME), a.COLUMN_NAME, 'IsIdentity') = 1
and a.COLUMN_NAME=c.name and a.table_name=OBJECT_NAME(c.OBJECT_ID)
order by a.TABLE_NAME
You can get this result , maybe similar

How to do if sqlserver table identity column exceed limited ?的更多相关文章
- 报错:Cannot insert explicit value for identity column in table 't' when identity_insert is set to OFF
通常情况下,不能向 SQL Server 自增字段插入值,如果非要这么干的话,SQL Server 就会好不客气地给你个错误警告: Server: Msg 544, Level 16, State 1 ...
- An explicit value for the identity column in table can only be specified when a column list is used and IDENTITY_INSERT is ON
If you run into the following error message: An explicit value for the identity column in table '< ...
- Part 4 Identity Column in SQL Server
Identity Column in SQL Server If a column is marked as an identity column, then the values for this ...
- ORACLE 12C Identity Column(身份列) 实现自增长字段
Oracle 12c提供的Identity Column特性简化了自增字段的定义. 声明自增字段通常有3种常见的用法,以下三种方式都支持INSERT语句中省略自增字段的插入,但有些许差别. 1. GE ...
- MSSql Server 索引'uq_f_userName' 依赖于 列'f_userName'。由于一个或多个对象访问此列,ALTER TABLE ALTER COLUMN f_userName 失败
--需求有变,需要往t_login表的f_userName字段添加外国人名,之前设置的varchar(10)不够,商议决定改成varchar(30),执行的时候,提示消息 索引'uq_f_userNa ...
- [Hive - LanguageManual] Alter Table/Partition/Column
Alter Table/Partition/Column Alter Table Rename Table Alter Table Properties Alter Table Comment Add ...
- Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -
mysql -A不预读数据库信息(use dbname 更快)—Reading table information for completion of table and column names Y ...
- 解决:Reading table information for completion of table and column names
mysql -A不预读数据库信息(use dbname 更快)—Reading table information for completion of table and column names Y ...
- Reading table information for completion of table and column names
mysql> use ad_detail_page;Reading table information for completion of table and column namesYou c ...
随机推荐
- 良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件. 我下面就把我日常工作和学习中经常用到的一些 Chr ...
- 【Java基础总结】数据库编程
MySQL数据库查询 import java.sql.*; public class JdbcDemo1{ public static void main(String[] args){ try{ / ...
- 顺丰丰桥软件开发工具包 (.NET)
丰桥 - 一站式对接服务平台, 打通客户与顺丰系统之间的信息流, 实现物流供应链一体化. 随着一个电商项目和顺丰合作, 信息流对接就是我们开发的事了. 顺丰通过丰桥提供了一些开放接口, 不过丰桥提供的 ...
- 从零开始入门 K8s | GPU 管理和 Device Plugin 工作机制
作者 | 车漾 阿里巴巴高级技术专家 本文整理自<CNCF x Alibaba 云原生技术公开课>第 20 讲. 关注"阿里巴巴云原生"公众号,回复关键词" ...
- 机器学习——提升方法AdaBoost算法,推导过程
0提升的基本方法 对于分类的问题,给定一个训练样本集,求比较粗糙的分类规则(弱分类器)要比求精确的分类的分类规则(强分类器)容易的多.提升的方法就是从弱分类器算法出发,反复学习,得到一系列弱分类器(又 ...
- C++ string 常用函数
C++ String常用函数 一,类型别名 size_type 无符号整型 iterator 迭代器类型 const_iterator 只读迭代器 reverse_iterator 逆序迭代器 con ...
- MySQL 行列相互转换
行列相互转换 /*创建表*/ CREATE TABLE ic ( NAME ), Product ), amount INT ); INSERT INTO ic VALUES (), (), (), ...
- C# 实现验证码识别,使用AspriseOCR.dll
验证码(Captcha)基于十道安全栅栏, 为网页.App.小程序开发者打造立体.全面的人机验证,最大程度地保护注册登录.活动秒杀.点赞发帖.数据保护等各大场景下的业务安全.要做自动化脚本程序,就要能 ...
- Cobalt_Strike扩展插件
Cobalt_Strike3.14下载: https://download.csdn.net/download/weixin_41082546/11604021 https://github.com/ ...
- 【WPF学习】第十九章 控件类
WPF窗口充满了各种元素,但这些元素中只有一部分是控件.在WPF领域,控件通常被描述为与用户交互的元素——能接收焦点并接受键盘或鼠标输入的元素.明显的例子包括文本框和按钮.然而,这个区别有时有些模糊. ...