开发者

List of system tables in SQLite

开发者 https://www.devze.com 2022-12-30 12:49 出处:网络
I am trying to filter all the tables in a SQLite database based on if they a开发者_如何学Gore system tables or user generated ones.

I am trying to filter all the tables in a SQLite database based on if they a开发者_如何学Gore system tables or user generated ones.

So far I've found out that they are the ones with the sqlite_ prefix and AllDataTypes.

Has anyone done something like this? Is there a list of them?

Thanks in advance.


There is only one system table that is of any consequence.

select * from sqlite_master

but you may get some useful information from sqlite_sequence,


I think it can be filtered by name (as you already done)

I've used script

SELECT 
  name, type
FROM 
  sqlite_master
WHERE 
  type in ('table', 'view')
AND 
  name not like 'sqlite?_%' escape '?'


sqlite_autoindex_TABLE_N - which will have information UNIQUE and PRIMARY KEY constraints on ordinary table.

sqlite_statN - which will have where N is an integer. Such tables store database statistics gathered by the ANALYZE command and used by the query planner to help determine the best algorithm to use for each query.

Source : https://www.sqlite.org/fileformat2.html

sqlite_user - this table will be present ,if we set up authentication-required database.

Source : http://www.sqlite.org/src/doc/trunk/ext/userauth/user-auth.txt

0

精彩评论

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

关注公众号