这是我的代码:
SELECT 'Fields 1: ' + COLUMN_NAME FROM information_schema.columns WHERE table_Name = 'SystemDefined' and table_schema = 'schemaAsset'
输出是:
Fields 1: Asset_No
Fields 1: AssetCategory
Fields 1: AssetClassification
Fields 1: PurchaseType
Fields 1: Department
Fields 1: RespPerson
Fields 1: Status
Fields 1: Location
我希望字符串迭代,以便输出为:
Fields 1: Asset_No
Fields 2: AssetCategory
Fields 3: AssetClassification
Fields 4: PurchaseType
Fields 5: Department
Fields 6: RespPerson
Fields 7: Status
Fields 8: Location
我可以使用什么算法使这个输出成为可能?