Nisarg Patel
Nisarg Patel

Reputation: 35

Query Last Inserted or Last updated rows from Snowflake Table

I would like to know how can I query for rows which were created or updated on a given date without using any specific column to look up in the database table. Is there a way information_schema can provide us with row level insert/update datetime?

Upvotes: 2

Views: 8863

Answers (1)

Sasank Sharma
Sasank Sharma

Reputation: 183

Row level modification timestamp is not available in the information_schema views currently.

However, there is a column LAST_ALTERED in the SNOWFLAKE.ACCOUNT_USAGE.TABLES view that gives the Date and time when the table was last altered by a DDL or DML operation.

https://docs.snowflake.com/en/sql-reference/account-usage/tables.html#columns

Upvotes: 6

Related Questions