一、数据库管理系统
常见数据库
SQL
My SQL
Oracle
二、SQL语句
SQL命令
数据插入命令(Insert)
数据更新命令(Update)
数据删除命令(Delete)
数据检索命令(Select)
数据库在终端上的基本语句
cd Desktop/ //(进入桌面)
sqlite3 testdb.sqlite //(新建tested.sqlite文件)【特别注意:如果没有,则是新建,如果已经存在,则是进入】
创建表
create table student (number integer,name text,age integer);
create table if not exists child(mothername text,fathername text);(一般这样写)
插入数据
insert into student values (100,’悠悠’,22);
检索查询数据
select * from student;
按条件查询
select * from student where age>44;
select *from student where age>44 and number = 500;