前端之家收集整理的这篇文章主要介绍了
sql – 如何获取具有标识列的所有表的列表,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
SELECT
[schema] = s.name,[table] = t.name
FROM sys.schemas AS s
INNER JOIN sys.tables AS t
ON s.[schema_id] = t.[schema_id]
WHERE EXISTS
(
SELECT 1 FROM sys.identity_columns
WHERE [object_id] = t.[object_id]
);
原文链接:https://www.f2er.com/mssql/82403.html