首页 > 数据库 >sqlite3

sqlite3

时间:2023-03-12 19:23:04浏览次数:39  
标签:name person student sqlite3 table where id

created: 2023-03-09 20:28:02
tags: [tools]

特殊命令

  • .exit 退出
  • .database 查询信息
  • .table 查看表格
  • .schema 查看结构

table

表操作

  • 创建
    create table person(id int, name text);
  • 删除
    drop table person;

数据操作

  • 重命名
    alter table person rename to student
  • 插入
    insert into student(id, name) values(1, '张三');
    insert into student values(2, '李四');
  • 修改
    update student set name='王五' where id = 3;
  • 删除
    delete from student where name='王五';
  • 查询
    select * from student;

where

  • in
    where id in (1,2,3);
  • and, or
    where id = 1 and name = '张三'
    where id = 1 or name = '张三'
  • between and
    where id between 1 and 3;
  • like
    where name = '张%'

标签:name,person,student,sqlite3,table,where,id
From: https://www.cnblogs.com/XiaoM0/p/17208813.html

相关文章

  • sqlite3 命令行
    进入sqlite3命令行模式安装好sqlite3之后,在linux命令行中输入sqlite3,进入sqlite3的命令行模式。root@172:/#sqlite3SQLiteversion3.23.12018-04-1017......
  • ARM架构工控机BL103兼容SQLite3
    钡铼技术BL302,它是一款基于arm架构的工业边缘计算机,采用NXP的高性能处理器I.MX6ULL 运行速度高达800MHz,并配有8GFlash空间和512M RAM,硬件接口1个MINI PCI-E口支持4G或者W......
  • php7 No package 'sqlite3' found
    源码安装php7.4的时候报了这个错,说是缺少sqlite3,可以试着:yuminstall sqlite-devel但是试了以后还是报错,是因为版本过低。于是,去它的官网下载安装包,解压,安装,make&&ma......
  • CentOS升级sqlite3教程,如何更新sqlite版本
    今天部署图床的时候发现啥都要升级,php还要更新。。。这版本要求太严格了,还不支持docker。。。只能一步一步来了。耗时间最长的就是这个更新sqlite3,转载一下教程。本文为......
  • 内网【安装环境】CONFIGURE: ERROR: PACKAGE REQUIREMENTS (SQLITE3 > 3.7.4) WERE NOT
    因为不使用yum安装的话只能使用rpm报错:configure:error:Packagerequirements(sqlite3>3.7.4)werenotmet:Package'sqlite3',requiredby'virtual:world',......
  • Android sqlite3工具的使用
    sqlite3<数据库名称>进入数据库操作模式eg:sqlite3contacts.db使用这条命名前,先进入到该数据库的位置(需要用adbshell),执行 sqlite3contacts.db.tables查看所有的......
  • 检测sqlite3数据库的完整性
    1/**2*@integrityCheck3*@brief检查数据库的完整性4*5*@paramdbPath数据库的路径6*@返回值0:完整;-1损坏7*/8intintegrityCheck(......
  • Compile Sqlite3 Executable, Static Library, and Shared Library on Linux
    DownloadSqlite3sourcecode,anddecompressittosomewhere.Enterthedecompressedfolder,typethefollowingcommandtogeneratedifferenttargetswithall......
  • Python中数据库模块(sqlite3,SQLite3)应用
    一、sqlite命令创建数据库:在控制台sqlite3name.databases查看数据库.tables查看表格名databaseName.d......
  • Python_sqlite3与sqlite数据库交互
    基础功能importsqlite3#sqlite一个文件就是一个库#连接test.db数据库,没有就创建conn=sqlite3.connect('test.db')#创建一个cursorcur=conn.cursor()#......