--课程表course包括(id,name,student_num,cread_t,teacher_id)
--查询表里全部内容
select * from course;
--查询表里指定字段内容,
select id,name from course;
--查询指定行内容,SELECT DISTINCT 查询不同行,即查询的值都是唯一不重复的,过滤查询及结果中的重复记录
select distinct teacher_id from course;
--对行进行筛选过滤
select * from course where id=1;
where 条件查询:
1.比较运算符<,>,=;
2.逻辑运算符and,or,not;
3.范围查询in[where name in(值1,值2....)]
between...and [where age between 25 and 30];
4.模糊查询like where 字段名 like 字段值(%代表任意多个字符,_代表一个字符,) ;
5空判断 is null 或is not null