Along these same lines, the ".table" command also accepts a pattern as its first argument. If you give an argument to the .table command, a "%" is both appended and prepended and a LIKE clause is added to the query. This allows you to list only those tables that match a particular ...
def show_all_tables(): sql = "SELECT name FROM sqlite_master WHERE type='table';" exec_sql(sql) # 创建命令行参数解析器 parser = argparse.ArgumentParser(description="SQLPython - A command-line tool for executing SQL queries.") parser.add_argument("db_file", help="Path to the SQLite da...
Show the CREATE statements(显示 CREATE 语句) .separator STRING Change separator used by output mode and .import .show Show the current values for various settings(显示各种设置) .tables ?PATTERN? List names of tables matching a LIKE pattern(查看数据库的表列表) .timeout MS Try opening locked ta...
Show status information about the database .dump ?OBJECTS?以 SQL 文本格式转储数据库 .echo on|off开启或关闭 echo 命令 .eqp on|off|full|...Enable or disable automaticEXPLAIN QUERY PLAN .excelDisplay the output of next command in spreadsheet .exit ?CODE?以CODE码退出SQLite提示符 .expertEXPERIMENT...
... 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. ....
.database 在当前的数据库⽂件中创建⼀张新表(语句) [注:以;结尾,<>中是我们可变的内容]create table <table_name>(表头信息1,表头信息2,表头信息3...);例如:create table people(NAME,SEX,AGE);<5>显⽰数据库中所有的表名 sqlite>.tables <6>查看表中表头的信息 .schema <7>显⽰调整成列...
.tables table_name 显示表及视图,无参数显示所有表和视图。 .index table_name 显示表的索引,无参数显示所有表的索引。旧版本命令.indices .show 显示当前显示格式设置情况。 如:headers、mode、output、colseparator、rowseparator等。 .mode 显示当前使用的显示格式。
相当于mysql的show tables命令 代码语言:javascript 复制 sqlite> .tables 退出SQLite 退出SQLite命令为.quit或.exit 代码语言:javascript 复制 sqlite> .quit 代码语言:javascript 复制 sqlite> .exit 备份与恢复 SQLite备份数据库的命令为.backup或者.save,其作用是将当前数据库备份到指定的文件中 代码语言:javascript...
Show status information about the database.dump ?TABLE? ... Render all database content as SQL #以 SQL 文本格式转储数据库;如果指定了 TABLE 表,则只转储匹配 LIKE 模式的 TABLE 表。.echo on|off Turn command echo on or off #开启或关闭 echo 命令。.eqp on|off|full|... ...
IfTABLEspecified,only dump tables matchingLIKEpatternTABLE..exit Exitthisprogram.help Showthismessage.open?--new??FILE?Close existing database and reopenFILEThe--newstartswithan empty file.output?FILENAME?Send output toFILENAMEor stdout.quit Exitthisprogram.readFILENAMEExecuteSQLinFILENAME.tables?TABL...