解一:
select book.*,booktype.title from
book
inner join
booktype
on book.type_id=booktype.type_id
注:book.*表示book中的所有字段
解二:
select book.*,b.title from
book
inner join
(select title,type_id from booktype) b//把select 查询变成表b
on book.type_id=b.type_id
补充:
当用到Count(列名)from (表名)一类的函数时如下
select count id from (select book.*,booktype.title from book inner join booktype on book.type_id=booktype.type_id ) as b
也要把查询转化成一个表的形式才行