------ 调用mac终端
----- cd Desktop/ //进入桌面
---- sqlite3 tested.sqlite // 创建数据
----- .help //进行下条命令
------ create table student1; // ( number integer , name text , age integer ) ;
------ 增 insert into student1(22,'鸭蛋',19);
------ 查 select * from student1;
------ select count(*) from student1; // 表里面有几行数据
------ 删 delete from student where name = '鸭蛋';
------------改 update student1 set age=11 where name='鸭蛋';
------------ insert into student1; //(22,'鸭蛋',19);
------------- insert into student1; //(28,'狗蛋',11);
----- .mode line; //改变样式
---------- select * from student1 where age>16; // 按照条件查询
----------- select * from student1 where age>16 and number = 102; // 按照条件联合查询
----------- select * from student1 order by age asc/desc; //按照年龄升序和降序排列
----------- .exit; /退出
----------- .database; //显示当前打开的数据库文件
----------- http://www.cr173.com/mac/123368.html // sqlite mac 附应用下载链接
sqlite在mac终端的简单实用
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。