开发者

how to retrieve views creation time?

Is it possible to know when a view has been created or updated?

If I run a query on infor开发者_运维技巧mation_schema.tables I get these infos only for "base table" while for view everything is equals to null. Thanks


No, it's not possible because view is not a table and not contain any physical data. MySQL creates view on the current data which exist in other tables, so you only can get update time for tables.

View is only a definition, and that definition are stored in INFORMATION_SHEMA. You can only get information about definition:

SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME = 'v';

But, you can't get update or created time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜