一、不同点:
    1. 创建数据库

MySQL有服务器,所以创建数据库是通过指令。create database student;
SQLite没有服务器,所以创建数据库是使用sqlite3直接创建.$sqlite3 student.db

  1. 查看所有数据库、表、帮助、退出等指令
    MySQL:
show databases
show tables
quit 
help 

        sqlite

.database
.tables
.quit
.help

二、相同点:
    增删改查命令都一样

插入一行数据(增)
insert into student(id,sex) values(1,“男”);
insert into student values(7,“徐桂双”,‘男’);
删除一行数据(删)
delete from student1 where age<26;
修改表中的信息(改)
update student1 set sex=‘男’ where id=1;
查看表中的信息(查)
select * from student;

Logo

更多推荐