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 ?的更多相关文章

  1. 报错: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 ...

  2. 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 '< ...

  3. 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 ...

  4. ORACLE 12C Identity Column(身份列) 实现自增长字段

    Oracle 12c提供的Identity Column特性简化了自增字段的定义. 声明自增字段通常有3种常见的用法,以下三种方式都支持INSERT语句中省略自增字段的插入,但有些许差别. 1. GE ...

  5. MSSql Server 索引'uq_f_userName' 依赖于 列'f_userName'。由于一个或多个对象访问此列,ALTER TABLE ALTER COLUMN f_userName 失败

    --需求有变,需要往t_login表的f_userName字段添加外国人名,之前设置的varchar(10)不够,商议决定改成varchar(30),执行的时候,提示消息 索引'uq_f_userNa ...

  6. [Hive - LanguageManual] Alter Table/Partition/Column

    Alter Table/Partition/Column Alter Table Rename Table Alter Table Properties Alter Table Comment Add ...

  7. 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 ...

  8. 解决: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 ...

  9. 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 ...

随机推荐

  1. Python 线性回归(Linear Regression) 基本理解

    背景 学习 Linear Regression in Python – Real Python,对线性回归理论上的理解做个回顾,文章是前天读完,今天凭着记忆和理解写一遍,再回温更正. 线性回归(Lin ...

  2. 天梯 L2 这是二叉搜索树吗?

    L2-004 这是二叉搜索树吗? (25 分) 一棵二叉搜索树可被递归地定义为具有下列性质的二叉树:对于任一结点, 其左子树中所有结点的键值小于该结点的键值: 其右子树中所有结点的键值大于等于该结点的 ...

  3. Vector人工智能机器人SDK使用笔记

    Cozmo是2016年推出的,2两年后的2018年Vector上市,具备语音助手和更多功能,元件数由300+升级到700+. Vector的SDK具体说明在:developer.anki.com/ve ...

  4. 原生JavaScript实现评分效果

    一.实现原理: 1.要设置一个“大总管变量”,用于记录点击时的星星下标,只声明不赋值. 2.移入每个星星时,先把所有的星星恢复到默认状态:再把当前星星及在它之前的星星设为选中状态. 3.移出每个星星时 ...

  5. 常用Java静态代码分析工具的分析与比较

    给国产静态代码检测工具Pinpoint打Call! 简介 本文首先介绍了静态代码分析的基本概念及主要技术,随后分别介绍了4种现有的主流Java静态代码分析工具 (Checkstyle,FindBugs ...

  6. 解决a标签点击会出现虚框现象

    1.解决a标签点击会出现虚框现象. 当a标签获得焦点的时候,a标签的周围就会出现虚框,它不同于border,不占任何宽度,a失去焦点的时候就会消失,就是outline. 在遨游,Firefox ,IE ...

  7. 树上点分治 poj 1741

    Give a tree with n vertices,each edge has a length(positive integer less than 1001). Define dist(u,v ...

  8. LCA - 倍增法去求第几个节点

    You are given a tree (an undirected acyclic connected graph) with N nodes, and edges numbered 1, 2, ...

  9. 5.Switch多选择结构

    Switch语句: 多选择结构还有一个实现方式就是 switch case 语句 switch case 语句判断一个变量与一系列值中的某个值是否相等,每个值称为一个分支. switch语句中的变量类 ...

  10. Drupal SA-CORE-2019-010 .开头文件名(如.htaccess) 文件上传

    目录 drupal .开头文件名 文件上传 原生模块分析 第三方模块分析 补丁 参考 drupal .开头文件名 文件上传 通过diff 8.8.1的补丁,很容易发现修复点,位于core\module ...