SELECT
a.name,
b.COLUMN_NAME,
‘1‘ AS aflag
FROM sys.tables a
LEFT JOIN information_schema.columns b ON b.table_name=a.name AND b.COLUMN_NAME IN(‘scantime‘,‘时间‘,‘stime‘,‘time‘)
WHERE name LIKE ‘PAR_%‘ AND a.name NOT LIKE ‘%_Removed‘ AND b.COLUMN_NAME IS NOT NULL
时间: 2024-12-29 23:53:12