SQLite数据库简单使用
发布时间:2020-12-12 19:26:04 所属栏目:百科 来源:网络整理
导读:SQLite 数据库使用 一、下载 地址: https://www.sqlite.org/download.html 因为我是os系统,所以下载了 “Precompiled Binaries for Mac OS X (x86)” 二、创建数据库 sqlite3 student.db //创建名为student的数据库 sqlite3命令,参数就是数据库的名称,如
SQLite 数据库使用一、下载地址: https://www.sqlite.org/download.html 因为我是os系统,所以下载了 “Precompiled Binaries for Mac OS X (x86)” 二、创建数据库sqlite3 student.db //创建名为student的数据库 sqlite3命令,参数就是数据库的名称,如果该数据库已存在,则使用,如果不存在,则新建一个 如图: 三、创建表create table person (id integer primary key autoincrement,name varchar(20),age smallint); // 创建了一个表 .table //查看已有的表 .schema person //查看表的结构 四、操作数据INSERT INTO person VALUES (NULL,'john',30); select * from person 参照SQL语句 参考博客:here (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |