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. oracle-按年、月、周、日、时、分 分组查询统计数据,无数据补零(connect by)

    目的:统计一段时间内每年.每月.每周.每日.每时.每分数据,无数据时自动补零 思路:1. 生成给定时间段对应日期 2. 将原表中该时间段内的不为0的数据量统计出来 3. 用left join连接起来, ...

  2. lucene&tantivy对比

    写入对比每个路径下都只能有一个IndexWriter负责写入,通过writer.lock实现.不同:lucene可以多个线程共享一个IndexWriter,每个线程负责写一个segment,从addD ...

  3. 深度学习论文翻译解析(七):Support Vector Method for Novelty Detection

    论文标题:Support Vector Method for Novelty Detection 论文作者:Bernhard Scholkopf, Robert Williamson, Alex Sm ...

  4. 通过例子进阶学习C++(七)CMake项目通过模板库实现约瑟夫环

    本文是通过例子学习C++的第七篇,通过这个例子可以快速入门c++相关的语法. 1.问题描述 回顾一下约瑟夫环问题:n 个人围坐在一个圆桌周围,现在从第 s 个人开始报数,数到第 m 个人,让他出局:然 ...

  5. kindeditor富文本编译器

    一.网址 kindeditor.net/about.php 二.编辑器的使用,看官方文档 三.常用初始化参数 1.resizeType2或1或0,2时可以拖动改变宽度和高度,1时只能改变高度,0时不能 ...

  6. Flsak学习笔记(1)

    Day 01 最近项目里要用python写后端,同学推荐了flask框架就来学一学.写这个博客的目的主要是记录一下自己学习的内容,有基础知识忘了不用一个个去百度,还有就是跟大家分享一下,有不是很容易理 ...

  7. idea使用PlantUML画类图教程

    嗯,在学设计模式时,画类图画的麻烦,就查了一下,发现idea可以通过插件实现.查了一下,学习,整理笔记和大家交流.  2019.9.11 安装可以百度,网上有好多. PlantUML 官网.如果时间多 ...

  8. QTP测试web时:打开ie浏览器进行录制但qtp录制脚本为空

    1. 关闭ie的保护模式:设置——internet选项——安全——取消勾选“启用保护模式” 这一步很关键,之前试过很多步骤,只有这个成功了. 修改后如果可行即可.如果不行再进行下面操作: 2.关闭杀毒 ...

  9. java异步调用方法

    一.利用多线程 直接new线程 Thread t = new Thread(){ @Override public void run() { longTimeMethod(); } }; 使用线程池 ...

  10. nginx default setting

    # You may add here your# server {#    ...# }# statements for each of your virtual hosts to this file ...