一:非等值和等值的多表查询
select c.catname '图书类别',b.bookname '书名',b.price '价格' from cats c,book b;
select c.catname '图书类别',b.bookname '书名',b.price '价格' from cats c,book b where c.id=b.catid;
二:自身连接查询
select cs1.catname '父类别名称',cs2.catname '子类类别名称' from cats cs1,cat2 cs2 where cs1.id=cs2.pid;
三:复合连接查询
多个条件使用“AND”关键字连接即可。