--获取表的索引
SELECT TABLE_NAME,COLUMN_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE TABLE_NAME='TableName';
--查询开启CT后 数据的版本
SELECT 主键,SYS_CHANGE_OPERATION,SYS_CHANGE_VERSION,SYS_CHANGE_COLUMNSFROM CHANGETABLE(CHANGES 表名, 2) AS CT
https://docs.microsoft.com/en-us/sql/relational-databases/system-functions/changetable-transact-sql?view=sql-server-2017
Powered by: 博客园 Copyright © 2024 生命如风 Powered by .NET 8.0 on Kubernetes