Sqlite   发布时间:2022-05-22  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了深入SQLite一:简介大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。


sqlite,是一款轻型的数据库,是遵守ACID的关联式数据库管理系统,它的设计目标是嵌入式的,而且目前已经在很多嵌入式产品中使用了它,它占用资源非常的低,在嵌入式设备中,可能只需要几百K的内存就够了。它能够支持Windows/linux/Unix等等主流的操作系统,同时能够跟很多程序语言相结合,比如Tcl、C#、php、Java等,还有ODBC接口同样比起Mysql、POSTGResql这两款开源世界著名的数据库管理系统来讲,它的处理速度比他们都快。sqlite第一个Alpha版本诞生于2000年5月。 至今已经有12个年头,sqlite也迎来了一个版本 sqlite 3已经发布。


sqlite官方主页
http://www.sqlite.org/

下载地址:
http://www.sqlite.org/download.html
for 32-bit windows (.NET Framework 4.0)

http://system.data.sqlite.org/downloads/1.0.82.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.82.0.exe

GUI客户端:
sqliteman http://sqliteman.com/

下载:http://sourceforge.net/project/platformdownload.php?group_id=189610

基本命令


@H_489_32@D:\>sqlite3 database.db sqlite> create table cnblogs(user text,fans Integer); sqlite> insert into cnblogs values('txw1958',36); sqlite> SELEct * from cnblogs; sqlite> update cnblogs set fans=100 where user='txw1958'; sqlite> delete from cnblogs where user='txw1958'; sqlite> SELEct * from cnblogs; sqlite> drop table cnblogs;


sqlite系统命令

@H_489_32@sqlite> .Help .BACkup ?DB? file BACkup DB (default "main") to file(备份数据库到文件) .bail ON|OFF Stop after hitTing an error. Default OFF(遇到错误退出,默认关闭) .databases List names and files of attached databases (查看目前挂的数据库的名字与文件) .dump ?table? ... Dump the database in an sql text format(以sql格式输出表结构) If table specifIEd,only dump tables matching liKE pattern table. .echo ON|OFF Turn command echo on or off 打开/关闭命令行回显 .exit Exit this program(退出程序) .explain ?ON|OFF? Turn output mode suitable for EXPLAIN on or off. With no args,it turns EXPLAIN on. .header(s) ON|OFF Turn display of headers on or off 打开|关闭头显示 .Help Show this messfans(显示帮助信息) .import file table import data from filE into table(把文件中的数据导入到表中,各字段用separator的值为分隔符) .inDices ?table? Show names of all inDices 显示索引名字 If table specifIEd,only show inDices for tables matching liKE pattern table. .load file ?ENTRY? Load an extension library 加载扩展库 .log file|off Turn logging on or off. file can be stderr/stdout 打开|关闭日志记录 .mode MODE ?table? Set output mode where MODE is one of: (设置输出格式) csv Comma-separated values (各字段以逗号为分隔符输出) column left-aligned columns. (See .wIDth)(以.wIDth设置的宽度显示各字段) HTML HTML <table> code (HTML表格格式输出) insert Sql Insert statements for table (以insert sql语句形式输出) line One value per line (fIEld = value的形式逐行输出) List Values delimited by .separator String (各字段以separator的值为分隔符输出) tabs Tab-separated values tcl TCL List elements .nullvalue StriNG Print StriNG in place of NulL values (输出字符串取代空值) .output filename Send output to filename (设置输出到文件) .output stdout Send output to the screen (设置输出到屏幕,默认) .prompt MAIN CONTinUE replace the standard prompts (修改提示符) .quit Exit this program (修改分隔符) .read filename Execute sql in filename (执行文件中的sql) .restore ?DB? file Restore content of DB (default "main") from file .scheR_901_11845@a ?table? Show the CREATE statements If table specifIEd,only show tables matching liKE pattern table. .separator StriNG Change separator used by output mode and .import (改变输出模式分隔符) .show Show the current values for varIoUs setTings (显示各项配置信息) .stats ON|OFF Turn stats on or off .tables ?table? List names of tables (列出表名) If table specifIEd,only List tables matching liKE pattern table. .timeout MS Try opening locked tables for MS milliseconds (超时时间,单位:毫秒) .wIDth NUM1 NUM2 ... Set column wIDths for "column" mode(设置列宽) .timer ON|OFF Turn the cpu timer measurement on or off sqlite>

大佬总结

以上是大佬教程为你收集整理的深入SQLite一:简介全部内容,希望文章能够帮你解决深入SQLite一:简介所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: