--creater view 视图明 as (select语句);
create view v_order_info as (select o.id,cl.name as client_name,g.name as good_name, o.price,o.num,o.datetime,b.brand_name,ca.cate_name,o.total_pricefrom orders as o left join goods as g on g.id = o.good_id left join brands as b on b.id=o.brand_id left join cates as ca on ca.id=o.cate_id left join clients as cl on cl.id=o.client_id order by datetime);