大佬教程收集整理的这篇文章主要介绍了SQLite3查询表结构,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
C:\>sqlite3_3_5.exe
sqlite version 3.3.5Enter ".Help" for instructions
创建表AuditData:
sqlite> create table AuditDate (time TEXT,Operatetype integer,Usernametext,EncrypteBox_Srcdisk text,EncrypteBox_Src@R_558_4687@t,EncrypteBox_SrcPath text,EncrypteBox_SrcEx text,EncrypteBox_Desdisk text,EncrypteBox_Des@R_558_4687@t,EncrypteBox_DesPath text,EncrypteBox_Desex text,file@R_558_4687@t,fileSrcPath text,fileDesPath text,fileExplain text);
查询表AuditDate的内容:
sqlite> select * from auditDate...> ;
查询当前数据库下的所有表名称:
sqlite> .tableAuditDate
使用sql语句查询表结构信息:
sqlite> SELEct * from sqlite_master where type = "table";table|AuditDate|AuditDate|2|create table AuditDate (time TEXT,username text,fileExplain text)
.wIDth NUM NUM ... Set column wIDths for "column" mode
退出sqlite3:
sqlite> .quit启动sqlite3,创建1.db,并连接到该数据库:
C:\>sqlite3_3_5.exe 1.dbEnter ".Help" for instructions
将表结构输出:
将AuditDate表的表结构输出:
sqlite> .dump AuditDate
BEGIN transaCTION;
create table AuditDate (time TEXT,En
crypteBox_Srcdisk text,
EncrypteBox_SrcEx text,Encrypt
eBox_DesPath text,fileDesP
ath text,fileExplain text);
COMMIT;
将查询结果输出到文件1.txt:
将查询结果输出到屏幕:
sqlite> .output stdoutileSrcPath text,fileExplain text)
创建表adb,并且向其中插入数据,然后查询该表中字段的数据类型:
sqlite>create table adb (@R_558_4687@t)
sqlite> SELEct typeof(Name) from adb;
sqlite> insert into adb (Name) values ('ddd');
sqlite> SELEct typeof(Name) from adb;
text
sqlite>
查看整个数据库的表结构
sqlite> .scheR_624_11845@a
create table a (time Integer not null default CURRENT_TIMESTAMP,@R_558_4687@t);
create table ab (time Integer,@R_558_4687@t);
create table abc (@R_558_4687@t,time Integer not null default CURRENT_TIMESTAMP);
create table abcd (@R_558_4687@t,time Integer not null default CURRENT_TIMESTAMP);
create table abcde (@R_558_4687@t,time Integer );
显示表头:
sqlite> .head on
sqlite> select * from abcde;
name|time
aaa|
sqlite>
查看当前sqlite3运行时的配置信息:
sqlite> .show echo: off explain: off headers: on mode: List nullvalue: "" output: stdout separator: "|" wIDth: sqlite>
以上是大佬教程为你收集整理的SQLite3查询表结构全部内容,希望文章能够帮你解决SQLite3查询表结构所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。