1、查询4个表(查询a、b、c、d表的几个字段,然后from后面是相当于将表名赋予一个别名即a、b、c、d。然后where是设置一些条件)

select a.name,a.quota_mailbox,a.quota_netdisk,a.limit_send,a.limit_recv,b.realname,c.dept_id,c.position,d.title from core_mailbox a,co_user b,co_department_member c,co_department d where a.mailbox_id=b.mailbox_id and a.mailbox_id=c.mailbox_id and c.dept_id=d.id;