如何解决apt-get中Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify的问题_疏狂的博客-CSDN博客_unmet dependencies. try 'apt --fix-broken install'
按照这个解决一下第一步 sudo apt --fix-broken install
太好了没报错
我在更新
爱了爱了
成功好像在招手
查看版本
安装可视化工具
sudo apt-get install sqlitebrowser
sqlitebrowser 数据库名查看数据库
数据库命令:
1)系统命令 , 都以'.'开头 .help 帮助
.exit 退出 .quit 退出sql命令行 .table 查看表 .schema 查看表的结构
英文文档
.archive ... Manage SQL archives: ".archive --help" for details .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 .dbinfo ?DB? Show status information about the database .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 .eqp on|off|full Enable or disable automatic EXPLAIN QUERY PLAN .excel Display the output of next command in a spreadsheet .exit Exit this program .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 Show this message .import FILE TABLE Import data from FILE into TABLE .imposter INDEX TABLE Create imposter table TABLE on index INDEX .indexes ?TABLE? Show names of all indexes If TABLE specified, only show indexes for tables matching LIKE pattern TABLE. .limit ?LIMIT? ?VAL? Display or change the value of an SQLITE_LIMIT .lint OPTIONS Report potential schema issues. Options: fkey-indexes Find missing foreign key indexes .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: ascii Columns/rows delimited by 0x1F and 0x1E csv Comma-separated values column Left-aligned columns. (See .width) html HTML
code insert SQL insert statements for TABLE line One value per line list Values delimited by "|" quote Escape answers as for SQL tabs Tab-separated values tcl TCL list elements .nullvalue STRING Use STRING in place of NULL values .once (-e|-x|FILE) Output for the next SQL command only to FILE or invoke system text editor (-e) or spreadsheet (-x) on the output. .open ?OPTIONS? ?FILE? Close existing database and reopen FILE The --new option starts with an empty file .output ?FILE? Send output to FILE or stdout .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 .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 Add --indent for pretty-printing .selftest ?--init? Run tests defined in the SELFTEST table .separator COL ?ROW? Change the column separator and optionally the row separator for both the output mode and .import .session CMD ... Create or control sessions .sha3sum ?OPTIONS...? 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 If TABLE specified, only list 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 FILE|off 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 Negative values right-justify
2)sql语句, 都以‘;’结尾
1-- 创建一张表 create table stuinfo(id integer, name text, age integer, score float); 2-- 插入一条记录 insert into stuinfo values(1001, 'zhangsan', 18, 80); insert into stuinfo (id, name, score) values(1002, 'lisi', 90);
3-- 查看数据库记录 select * from stuinfo; select * from stuinfo where score = 80; select * from stuinfo where score = 80 and name= 'zhangsan'; select * from stuinfo where score = 80 or name='wangwu'; select name,score from stuinfo; 查询指定的字段 select * from stuinfo where score >= 85 and score < 90;
4-- 删除一条记录 delete from stuinfo where id=1003 and name='zhangsan';
插入的时候把wangyu插到得分里了,不对怎么删王五了重来
SQLite不会检查数据类型
5-- 更新一条记录 update stuinfo set age=20 where id=1003; update stuinfo set age=30, score = 82 where id=1003;
6-- 删除一张表 drop table stuinfo;
7-- 增加一列 alter table stuinfo add column sex char;
8-- 删除一列(不支持直接删除,创建新表删除旧表将新表名改成旧表) create table stu as select id, name, score from stuinfo; drop table stuinfo; alter table stu rename to stuinfo;
9、数据库设置主键和自增: create table info(id integer primary key autoincrement, name vchar);
int sqlite3_exec( sqlite3* db, /* An open database */ const char *sql, /* SQL to be evaluated */ int (*callback)(void* arg,int,char**,char**), /* Callback function */ void * arg, /* 1st argument to callback */ char **errmsg /* Error msg written here */ ); 功能:执行一条sql语句 参数:
int sqlite3_get_table( sqlite3 *db, /* An open database */ const char *zSql, /* SQL to be evaluated */ char ***pazResult, /* Results of the query */ int *pnRow, /* Number of result rows written here */ int *pnColumn, /* Number of result columns written here */ char **pzErrmsg /* Error msg written here */ ); void sqlite3_free_table(char **result);