读书人

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

发布时间: 2012-03-15 11:50:38 作者: rapoo

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

读书人网 >其他数据库

热点推荐