当前位置: 代码迷 >> 其他数据库 >> 【怎么查看Sqlite数据库中有多少张表[顶者有分]
  详细解决方案

【怎么查看Sqlite数据库中有多少张表[顶者有分]

热度:2636   发布时间:2013-02-26 00:00:00.0
【如何查看Sqlite数据库中有多少张表[顶者有分]
SqlServer中这样统计:

select name from sysobjects where xtype='U'
要知道总数的话就简单了:
select count(*) from sysobjects where xtype='U'

Oracle中这样查询:
Select * From user_tables;

========================以上两个都无法使用。。================

------解决方案--------------------------------------------------------
select count(*) from sqlite_master where type='table'
------解决方案--------------------------------------------------------
SQL code
select count(*) from sysobjects where xtype='U' /*----------- 15(所影响的行数为 1 行)*/
------解决方案--------------------------------------------------------
SQL code
select namefrom sqlite_masterwhere type='table';
  相关解决方案