select dept_id,dept_name,parent_id from dept_p uc 此处是将表dept_p取别名为uc select dept_id from (select dept_id,dept_name,parent_id from dept_p) uc 后面的select语句获得的表的别名为uc sql中,如果为一个表取了别名,那么这条sql语句需要为所有查询到的表提供别名。