百度360必应搜狗淘宝本站头条
当前位置:网站首页 > IT知识 > 正文

sqlite3 内部指令集

liuian 2025-02-15 00:05 15 浏览

sqlite> .help

.auth ON|OFF Show authorizer callbacks

.backup ?DB? FILE Backup DB (default "main") to FILE

.bail on|off Stop after hitting an error. Default OFF

.binary on|off Turn binary output on or off. Default OFF

.cd DIRECTORY Change the working directory to DIRECTORY

.changes on|off Show number of rows changed by SQL

.check GLOB Fail if output since .testcase does not match

.clone NEWDB Clone data into NEWDB from the existing database

.databases List names and files of attached databases

.dbconfig ?op? ?val? List or change sqlite3_db_config() options

.dbinfo ?DB? Show status information about the database

.dump ?TABLE? ... Render all database content as SQL

.echo on|off Turn command echo on or off

.eqp on|off|full|... Enable or disable automatic EXPLAIN QUERY PLAN

.excel Display the output of next command in a spreadsheet

.exit ?CODE? Exit this program with return-code CODE

.expert EXPERIMENTAL. Suggest indexes for specified queries

.fullschema ?--indent? Show schema and the content of sqlite_stat tables

.headers on|off Turn display of headers on or off

.help ?-all? ?PATTERN? Show help text for PATTERN

.import FILE TABLE Import data from FILE into TABLE

.imposter INDEX TABLE Create imposter table TABLE on index INDEX

.indexes ?TABLE? Show names of indexes

.limit ?LIMIT? ?VAL? Display or change the value of an SQLITE_LIMIT

.lint OPTIONS Report potential schema issues.

.log FILE|off Turn logging on or off. FILE can be stderr/stdout

.mode MODE ?TABLE? Set output mode

.nullvalue STRING Use STRING in place of NULL values

.once (-e|-x|FILE) Output for the next SQL command only to FILE

.open ?OPTIONS? ?FILE? Close existing database and reopen FILE

.output ?FILE? Send output to FILE or stdout if FILE is omitted

.parameter CMD ... Manage SQL parameter bindings

.print STRING... Print literal STRING

.progress N Invoke progress handler after every N opcodes

.prompt MAIN CONTINUE Replace the standard prompts

.quit Exit this program

.read FILE Read input from FILE

.restore ?DB? FILE Restore content of DB (default "main") from FILE

.save FILE Write in-memory database into FILE

.scanstats on|off Turn sqlite3_stmt_scanstatus() metrics on or off

.schema ?PATTERN? Show the CREATE statements matching PATTERN

.selftest ?OPTIONS? Run tests defined in the SELFTEST table

.separator COL ?ROW? Change the column and row separators

.session ?NAME? CMD ... Create or control sessions

.sha3sum ... Compute a SHA3 hash of database content

.shell CMD ARGS... Run CMD ARGS... in a system shell

.show Show the current values for various settings

.stats ?on|off? Show stats or turn stats on or off

.system CMD ARGS... Run CMD ARGS... in a system shell

.tables ?TABLE? List names of tables matching LIKE pattern TABLE

.testcase NAME Begin redirecting output to 'testcase-out.txt'

.timeout MS Try opening locked tables for MS milliseconds

.timer on|off Turn SQL timer on or off

.trace ?OPTIONS? Output each SQL statement as it is run

.vfsinfo ?AUX? Information about the top-level VFS

.vfslist List all available VFSes

.vfsname ?AUX? Print the name of the VFS stack

.width NUM1 NUM2 ... Set column widths for "column" mode

相关推荐

10种常见的MySQL错误,你可中招?

【51CTO.com快译】如果未能对MySQL8进行恰当的配置,您非但可能遇到无法顺利访问、或调用MySQL的窘境,而且还可能给真实的应用生产环境带来巨大的影响。本文列举了十种MySQL...

MySQL主从如何保证数据一致性

MySQL主从(主备)搭建请点击基于Spring的数据库读写分离。MySQL主备基本原理假设主备切换前,我们的主库是节点A,节点B是节点A的备库,客户端的读写都是直接访问节点A,节点B只是将A的更新同...

MySQL低版本升级操作流程

(关注“数据库架构师”公众号,提升数据库技能,助力职业发展)0-升级背景MySQL5.5发布于2010年,至今已有十年历史,官方已经停止更新。2008年发布的MySQL5.1版本,在2018年...

MySQL数据库知识

MySQL是一种关系型数据库管理系统;那废话不多说,直接上自己以前学习整理文档:查看数据库命令:(1).查看存储过程状态:showprocedurestatus;(2).显示系统变量:show...

Mysql 8.4数据库安装、新建用户和数据库、表单

1、下载MySQL数据库yuminstall-ywgetperlnet-toolslibtirpc#安装wget和perl、net-tools、libtirpcwgethtt...

mysql8.0新功能介绍

MySQL8.0新特性集锦一、默认字符集由latin1变为utf8mb4在8.0版本之前,默认字符集为latin1,utf8指向的是utf8mb3,8.0版本默认字符集为utf8mb4,utf8默...

全网最详细解决Windows下Mysql数据库安装后忘记初始root 密码方法

一、准备重置root的初始化密码Win+R键启动命令输入窗口;输入cmd打开命令执行窗口;##界面如下##输入命令:netstopmysqld#此操作会停止当前运行的...

互联网大厂面试:MySQL使用grant授权后必须flush privilege吗

从我上大学时,数据库概论老师就告诉我,MySQL使用grant对用户授权之后,一定记得要用flushprivilege命令刷新缓存,这样才能使赋权命令生效。毕业工作以后,在很多的技术文档上,仍然可以...

# mysql 8.0 版本无法使用 sqlyog 等图形界面 登录 的解决方法

30万以下的理想L6来了##mysql8.0版本无法使用sqlyog等图形界面登录的解决方法当我们在cmd下登录mysql时正常时,用sqlyog等图形界面连接数据库时却...

MySQL触发器介绍

前言:在学习MySQL的过程中,可能你了解过触发器的概念,不清楚各位是否有详细的去学习过触发器,最近看了几篇关于触发器的文档,分享下MySQL触发器相关知识。1.触发器简介触发器即trigg...

管理员常用的MySQL命令汇总(一)

以下是管理员常用的MySQL命令:以管理员身份连接到MySQL:mysql-uroot-p创建新的MySQL用户:CREATEUSER'username'@'...

Linux(CentOS) 在线安装MySQL8.0和其他版本,修改root密码

一:安装MySQL数据库1),下载并安装MySQL官方的YumRepositorymysql官方仓库地址:https://dev.mysql.com/downloads/repo/yum/选择自...

解决 MySQL 8.0 一直拒绝 root 登录问题

Accessdeniedforuser'root'@'localhost'(usingpassword:YES)这个错误在网上搜一下,能看到非常多的此类...

大模型MCP之MYSQL安装

前言学习大模型的时候需要一个mysql,原因还是在公司使用电脑的时候不允许按照Docker-Desktop,我的宿主机其实是MAC,我习惯上还是在centsos上面安装,就发现这件过去很简单的事情居然...

MySQL ERROR 1396

ERROR1396(HY000):OperationCREATEUSERfailedfor'usera'@'%'问题描述mysql>create...