ios sqlite
2015-06-02 10:11
239 查看
Last login: Tue Jun 2 08:39:17 on console
sunlihuodeMacBook-Air:~ sunlihuo$ pwd
/Users/sunlihuo
sunlihuodeMacBook-Air:~ sunlihuo$ sqlite3 test.sqlite
SQLite version 3.8.5 2014-08-15 22:37:57
Enter ".help" for usage hints.
sqlite> create table if not exists test(id integer primary key, name varchar2, age int);
sqlite> .tables
test
sqlite> .tables
test
sqlite> .schema test
CREATE TABLE test(id integer primary key, name varchar2, age int);
sqlite> alter table test add column test int;
sqlite> .schema test
CREATE TABLE test(id integer primary key, name varchar2, age int, test int);
sqlite> insert into test (name, age) values ('sunlihuo',18);
sqlite> select * from test;
1|sunlihuo|18|
sqlite> .mode column
sqlite> .headeron
Error: unknown command or invalid arguments: "headeron". Enter ".help" for help
sqlite> select * from test;
1 sunlihuo 18
sqlite> .header on
sqlite> select * from test;
id name age test
---------- ---------- ---------- ----------
1 sunlihuo 18
sqlite> update table set name = 'sunlili' where id = 1;
Error: near "table": syntax error
sqlite> update test set name = 'sunlili' where id = 1;
sqlite> select * from test;
id name age test
---------- ---------- ---------- ----------
1 sunlili 18
sqlite> drop table if exists test;
sqlite> select * from test;
Error: no such table: test
sqlite>
sunlihuodeMacBook-Air:~ sunlihuo$ pwd
/Users/sunlihuo
sunlihuodeMacBook-Air:~ sunlihuo$ sqlite3 test.sqlite
SQLite version 3.8.5 2014-08-15 22:37:57
Enter ".help" for usage hints.
sqlite> create table if not exists test(id integer primary key, name varchar2, age int);
sqlite> .tables
test
sqlite> .tables
test
sqlite> .schema test
CREATE TABLE test(id integer primary key, name varchar2, age int);
sqlite> alter table test add column test int;
sqlite> .schema test
CREATE TABLE test(id integer primary key, name varchar2, age int, test int);
sqlite> insert into test (name, age) values ('sunlihuo',18);
sqlite> select * from test;
1|sunlihuo|18|
sqlite> .mode column
sqlite> .headeron
Error: unknown command or invalid arguments: "headeron". Enter ".help" for help
sqlite> select * from test;
1 sunlihuo 18
sqlite> .header on
sqlite> select * from test;
id name age test
---------- ---------- ---------- ----------
1 sunlihuo 18
sqlite> update table set name = 'sunlili' where id = 1;
Error: near "table": syntax error
sqlite> update test set name = 'sunlili' where id = 1;
sqlite> select * from test;
id name age test
---------- ---------- ---------- ----------
1 sunlili 18
sqlite> drop table if exists test;
sqlite> select * from test;
Error: no such table: test
sqlite>
相关文章推荐
- Session原理、安全以及最基本的Express和Redis实现
- redis之AOF持久化机制
- mysql 安装(windows)
- mysql status 解释 Handler_read%
- Oracle 死锁的检测查询及处理
- mysql一: 索引优化
- MySQL查询长数据是无值返回(可以尝试换行符)
- Oracle EBS R12.2 修改APPS密码方法
- 彻底删除oracle的方法
- 分布式MySQL数据库TDSQL架构分析
- 批量修改sql server 2008的架构
- MySQL之——新安装的MySQL必须调整的10项配置(插曲)
- Mongodb安装配置
- Oracle中merge into的使用
- MySQL分页查询
- pg_dump的导出参数(PostgreSQL)
- Mysql 求连续范围和间断范围
- 初涉SQL Server性能问题(4/4):列出最耗资源的会话
- SQL Server中raiserror的介绍
- 【原创】MySql 数据库导入导出(备份)