1张表,查2次,把2表分别名,作条件查询。
SELECT a.id,a.name ,b.name AS pname FROM tbl_test AS a ,tbl_test AS b WHERE a.pid = b.id AND a.id = 5;