咋样用一条SQL吧这两条数据合成一条数据,a表的数据都一样,区别在于b表。a表和b表的公共字段a.accountid=b.accountid是这个,现在我想要一条数据,取别名也可以,下面这个是查询语句。
select a.accountid ,a.reportmatters , b.resultid,b.checkdeptid,b.checkdeptid ,b.checkorgid ,b.checkor ,b.checktime ,b.checkresult ,b.checkdesc ,b.checklevel
from t21_pma_account_info a,t21_pma_checkresult b
where a.accountid=b.accountid
and a.accountid='65B96092FFFFFFFC0159DFB574FDF7E8'