SQLite 基本操作--查看数据表信息
2016-05-13 18:31
375 查看
sqlite>.tables --查看当前数据库所有表 sqlite>.tables table_name --查看当前数据库指定表
sqlite>.schema --查看当前数据库所有表的建表(CREATE)语句
sqlite>.schema table_name --查看指定数据表的建表语句
sqlite>select * from sqlite_master from; --查看所有表结构及索引信息
sqlite>select * from sqlite_master where type='table'; --查看所有表结构信息
sqlite>select name from sqlite_master where type='table'; --对于表来说,name字段指表名,查询所有表
sqlite>select * from sqlite_master where type='table' and name='table_name'; --查看指定表结构信息
sqlite>select * from sqlite_master where type='index'; --查看所有表索引信息,查询所有索引
sqlite>select name from sqlite_master where type='table'; --对于索引来说,name字段指索引名
sqlite>select * from sqlite_master where type='index' and name='table_name'; --查看指定表索引信息
sqlite>pragma table_info ('table_name') --查看指定表所有字段信息,类似于msyql:desc table_name
sqlite>select typeof('column') from table_name; --查看指定表字段【column】类型,括号内可不输引号
相关文章推荐
- Oracle11gR2下搭建DataGuard主备同步详解
- mysql tmp_table_size和max_heap_table_size大小配置
- Magento中打印SQL语句来调试
- SQL server 和Oracle 序列
- redis test
- Centos下使用yum安装MariaDB
- Redis Cluster 实现细节
- Oracle安装临时客户端使用总结
- sql插入多条数据
- 编译pure-ftpd时提示错误Your MySQL client libraries aren't properly installed
- magento 的一些Sql查询
- MongoDB副本集搭建及备份恢复
- mysql 注释符号
- Elasticsearch mysql 增量同步 三表联合 脚本
- SQLite 点命令简介
- mysql链表查询
- mysql表的连接方式
- 数据仓库中的 SQL 性能优化(Hive篇)
- ORACLE日期时间函数大全
- Navicat连接Oracle详细教程