Skip to content

Instantly share code, notes, and snippets.

@emaillenin
Created December 12, 2013 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save emaillenin/7928180 to your computer and use it in GitHub Desktop.
Save emaillenin/7928180 to your computer and use it in GitHub Desktop.
Finds the columns that has been recently accessed in Teradata
select ObjectColumnName from dbc.dbqlobjtbl a
join dbc.dbqlogtbl b on a.ProcID = b.ProcID
and a.QueryID = b.QueryID
where ObjectDatabaseName = 'database_name' and ObjectTableName = 'table_name' and statementtype = 'Select' and ObjectType = 'Col'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment