不错呦!smile@林凯西,确保“准备文件”中的几个文件都有安装,S...您好,看了您这篇帖子觉得很有帮助。但是有个问题想请...我的修改过了怎么还被恶意注册呢 @jjjjiiii 用PJ快9年了,主要是A...PJ3啊,貌似很少有人用PJ了,现在不是WP就是z...@332347365,我当时接入时错误码没有-10...楼主,ChkValue值应为-103是什么意思呢?...大哥 你最近能看到我发的信息,请跟我联系,我有个制...
DOS操作Sqlite命令大全
编辑:dnawo 日期:2008-03-05
1.创建数据库/表,记录添加/查询/修改和删除
F:\>sqlite3.exe test.db
sqlite> create table admin(username text,age integer);
sqlite> insert into admin values('kuang',25);
sqlite> select * from admin;
sqlite> update admin set username='kk',age=24 where username='kuang' and age=25;
sqlite> delete from admin where username='kk';
注:每条sql语句后必须以";"号结尾!
2.使用批处理操作数据库
run.bat:
sql.txt:
3.Sqlite系统命令
.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格式输出表结构)
.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.
.header(s) ON|OFF Turn display of headers on or off
.help Show this message(显示帮助信息)
.import FILE TABLE Import data from FILE into TABLE(把文件中的数据导入到表中,各字段用separator的值为分隔符)
.indices TABLE Show names of all indices on TABLE
.load FILE ?ENTRY? Load an extension library
.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语句)
.schema ?TABLE? Show the Create statements(以SQL格式输出表结构)
.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 tables for MS milliseconds(超时时间,单位:毫秒)
.width NUM NUM ... Set column widths for "column" mode(设置列宽)
F:\>sqlite3.exe test.db
sqlite> create table admin(username text,age integer);
sqlite> insert into admin values('kuang',25);
sqlite> select * from admin;
sqlite> update admin set username='kk',age=24 where username='kuang' and age=25;
sqlite> delete from admin where username='kk';
注:每条sql语句后必须以";"号结尾!
2.使用批处理操作数据库
run.bat:
复制内容到剪贴板
程序代码

@echo off
sqlite3.exe test.db<sql.txt
pause>nul
sqlite3.exe test.db<sql.txt
pause>nul
sql.txt:
复制内容到剪贴板
程序代码

create table admin(username text,age integer);
insert into admin values('kuang',25);
select * from admin;
.quit
insert into admin values('kuang',25);
select * from admin;
.quit
3.Sqlite系统命令
.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格式输出表结构)
.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.
.header(s) ON|OFF Turn display of headers on or off
.help Show this message(显示帮助信息)
.import FILE TABLE Import data from FILE into TABLE(把文件中的数据导入到表中,各字段用separator的值为分隔符)
.indices TABLE Show names of all indices on TABLE
.load FILE ?ENTRY? Load an extension library
.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语句)
.schema ?TABLE? Show the Create statements(以SQL格式输出表结构)
.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 tables for MS milliseconds(超时时间,单位:毫秒)
.width NUM NUM ... Set column widths for "column" mode(设置列宽)
评论: 0 | 引用: 0 | 查看次数: 7226
发表评论
请登录后再发表评论!