首页 文章

SQLite表创建日期

提问于
浏览
0

有没有办法在SQLite中查询表的创建日期?总的来说,我是SQL新手 . 我刚发现这个SQL Server table creation date query . 我假设sqlite_master相当于SQLite中的sys.tables . 那是对的吗?但是我的sqlite_master表只有"type","name","tbl_name","rootpage"和"sql"列 . 如果在SQLite中无法做到这一点,那么自己实现此功能的最佳方法是什么?

1 回答

  • 1

    SQLite本身不存储此数据 . 就像你说的那样, sqlite_master 表没有任何相关的列 .

    有's no particularly nice way that I can come up with to implement it. You could create some sort of interface for creating tables, and have it note the time whenever you create a new one, but anything created through a different method won' t经历相同的过程 . 它看起来似乎无法在 CREATE TABLE 上设置触发器,所以这也不是一个选项 .

    你为什么想要这个功能?创建表似乎是你经常不会做的事情,也许有更好的方法来解决问题?

相关问题