首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

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

2012-03-15 
【如何查看Sqlite数据库中有多少张表[顶者有分]SqlServer中这样统计:select name from sysobjects where xt

【如何查看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'; 

热点排行