4.1带In 关键字的子查询 一个查询语句的条件可能落在另一个SELECT 语句的查询结果中. SELECT * FROM t_book WHERE booktypeId IN (SELECT id FROM t_booktype);SELECT * FROM t_book WHERE booktypeId NOT IN (SELECT id FROM t_booktype); 4.2 带比较运算符的子查询 子查询可以使用比较运算符. SELECT * FROM t_book WHERE pri…
--表stuid name 1, Jack2, Tom3, Kity4, nono--表examid grade1, 562, 7611, 89 内连接 (显示两表id匹配的)select stu.id,exam.id,stu.name, exam.grade from stu inner join exam on stu.id=exam.idstu.id exam.id name grade--------------------------------1 1 Jack 562 2 Tom 7…