简体   繁体   English

数据库中所有表的种子主键

[英]Reseed Primary Keys from all tables on a database

I´m trying to reset the identity column of a few tables. 我正在尝试重置一些表的标识列。 The problem is that, these identity columns are used as a foreign keys in other tables, how can i do this? 问题是,这些标识列在其他表中用作外键,我该怎么做?

Remove your table relationships. 删除您的表关系。

And relate the tables again after re creating the identity columns of your tables. 在重新创建表的标识列之后,再次关联表。

Regards 问候

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从特定数据库中的所有表中检索不属于主键和外键的所有列 - How to retrieve all the columns from all of the tables in a particular database which are not part of primary keys and foreign keys 导出数据库中的所有对象(表,主键/外键等)。 - Exporting all objects in database (tables,primary / foreign keys, etc..) 创建有关主键和外键的数据库表 - Creating database tables regarding Primary and Foreign Keys 如何获取 Sybase 中所有表的主键 - How to get primary keys for all tables in Sybase 如何列出数据库中的所有主键? - How to list all primary keys in database? 从单个表派生的所有表上的主键的目的是什么? - What could be the purpose of primary keys on all tables being derived from a single table? 即使主键和外键不均匀,SQL 查询也能从多个表中获取所有行 - SQL query to get all the rows from multiple tables even it has uneven primary and foreign keys 提高 SQL 视图连接多个表的速度,所有表都带有主键 - Improve speed of SQL view joining multiple tables, all with primary keys 数据库中的所有表都可以包含外键吗? - Can all the tables in the database contain foreign keys? 来自不同表的 2 个主键的外键 - Foreign Key Coming from 2 Primary Keys from Distinct Tables
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM