官方:https://www.sqlite.org/index.html

简介

SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. SQLite is the most used database engine in the world. SQLite is built into all mobile phones and most computers and comes bundled inside countless other applications that people use every day.

The SQLite file format is stable, cross-platform, and backwards compatible and the developers pledge to keep it that way through at least the year 2050. SQLite database files are commonly used as containers to transfer rich content between systems and as a long-term archival format for data. There are over 1 trillion (1e12) SQLite databases in active use.

安装

# yum install sqlite-devel

使用

# sqlite3 -version

# sqlite3 /path/to/db

sqlite>.database

sqlite>.schema

sqlite>.schema table_name

sqlite>insert/delete/select/update

sqlite>.exit

sqlite>.quit

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
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 message
.import FILE TABLE Import data from FILE into TABLE
.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)
html HTML <table> code
insert SQL insert statements for TABLE
line One value per line
list Values delimited by .separator string
tabs Tab-separated values
tcl TCL list elements
.nullvalue STRING Use STRING in place of NULL values
.output FILENAME Send output to FILENAME
.output stdout Send output to the screen
.print STRING... Print literal STRING
.prompt MAIN CONTINUE Replace the standard prompts
.quit Exit this program
.read FILENAME Execute SQL in FILENAME
.restore ?DB? FILE Restore content of DB (default "main") from FILE
.schema ?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
.trace FILE|off Output each SQL statement as it is run
.vfsname ?AUX? Print the name of the VFS stack
.width NUM1 NUM2 ... Set column widths for "column" mode
.timer ON|OFF Turn the CPU timer measurement on or off

【原创】数据库基础之Sqlite的更多相关文章

  1. python---基础知识回顾(八)数据库基础操作(sqlite和mysql)

    一:sqlite操作 SQLite是一种嵌入式数据库,它的数据库就是一个文件.由于SQLite本身是C写的,而且体积很小,所以,经常被集成到各种应用程序中,甚至在iOS和Android的App中都可以 ...

  2. Android基础总结+SQlite数据库【申明:来源于网络】

    Android基础总结+SQlite数据库[申明:来源于网络] 基础总结篇之一:Activity生命周期:http://blog.csdn.net/liuhe688/article/details/6 ...

  3. 安卓基础之Sqlite数据库最最基础操作

    Sqlite数据库基础操作 摘要:在应用中新建一个数据库,并创建一个数据表写入数据,然后读取表中数据并展示. 主要逻辑: 1.通过继承SQLiteOpenHelper自定义类,定制数据库的表结构,初始 ...

  4. Andoird - SQLite 数据库 基础教程

    链接来源 http://www.tutorialspoint.com/android/android_sqlite_database.htm SQLite是一个开源的SQL数据库,这个数据库把数据存储 ...

  5. oracle系列--第一篇 数据库基础

    第一章 数据库基础 1.1 数据管理概述 1.1.1 什么是数据管理 与我们人类相比,计算机的最大优势就是能够高速.精准地运行,其运行的过程就是执行程序代码和操作指令.处理数据的过程.可以说,数据处理 ...

  6. 【Salvation】——关卡功能&数据库基础实现

    写在前面:项目的关卡功能和数据库基础实现是小组其他成员实现的部分,这里作为学习总结.关卡功能块使用C#语言编写脚本,在Unity3D游戏引擎的环境中实现,数据库功能块使用PHP作为服务端获取MySQL ...

  7. 数据库基础SQL知识面试题二

    数据库基础SQL知识面试题二 作者:尹正杰  版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.选课系统SQL语法练习 course数据库中有以下四张表: •students表(学生表): si ...

  8. 数据库基础SQL知识面试题一

    数据库基础SQL知识面试题一 作者:尹正杰  版权声明:原创作品,谢绝转载!否则将追究法律责任. 如标题所示,本篇博客主要介绍基础知识的面试题.大家可以用来测试面试者的技术水平,由于个人水平所限,难免 ...

  9. ORM数据库框架 greenDAO SQLite MD

    Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...

随机推荐

  1. 字符串暴力枚举子序列求LCS

    题意: 求n个串里的LCS,长度相同时按照字典序排序 solution: 断环为链,二进制枚举子序列,压入vector,按照字典序排序 把出现次数为n的,压入第二个vector 输出最长的第二个vec ...

  2. cast()、decimal(M,D) --SQL对查询字段保留小数位操作

    参考:http://database.51cto.com/art/201005/201651.htm http://www.lai18.com/content/1693593.html 直接上例子,以 ...

  3. legend3---10、vue与lavarel的blade模板加jquery页面开发方式比较

    legend3---10.vue与lavarel的blade模板加jquery页面开发方式比较 一.总结 一句话总结: lavarel的blade模板加jquery:速度快一点:速度快一点,页面加载数 ...

  4. HearthBuddy CSharpCodeProvider 如何编译cs文件

    源码 源码1 namespace Hearthbuddy.Windows{    // Token: 0x02000041 RID: 65    public class MainWindow : W ...

  5. nginx状态码

    200:服务器成功返回网页 403:服务器拒绝请求.404:请求的网页不存在 499:客户端主动断开了连接.500:服务器遇到错误,无法完成请求.502:服务器作为网关或代理,从上游服务器收到无效响应 ...

  6. [Java]给指定时间加上十秒

    package com.testEmp; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util. ...

  7. qt+opencv编译环境的配置

    第一步:安装与配置Qt 从https://account.qt.io/downloads下载Qt,并注册账户.开始安装.首先下载qt-opensource-windows-x86-mingw482_o ...

  8. 信息学竞赛一本通提高版AC题解—例题1.1活动安排

    书中代码有误.书中为sort(a+1,a+n+1,Cmp). // // Created by yuxi on 19-1-13. // /* * * <信息学竞赛一本通-提高版>全部AC解 ...

  9. 转 MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解决办法

    http://blog.sina.com.cn/s/blog_637e04c9010117ri.html 1 问题 [root@localhost mysql]# /etc/rc.d/init.d/m ...

  10. 在SuSE安装wifidog认证服务器和网关

    在SuSE安装认证服务器和网关 在openSuSE 10.3安装wifidog 认证服务器和网关在同台设备中安装完毕.以下是openSuSE的详细安装指南.这个安装是非常初级的,所以请验证或更正. - ...