国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

不錯的sql

2024-07-21 02:51:58
字體:
來源:轉載
供稿:網友
關聯多張表查詢但查詢結果只要求一條的情況下,可以使用as后面拼接數據,雖然簡單,但是大多數情況下,我們都會慣性思維使用left join或其他,但是如果需要一條查詢結果,那么這種方式是一種不錯的解決方案 select a.ID as id , a.member_no as memberNo , a.member_name as memberName , a.company_id_ex as companyIdEx , a.DOCUMENT_TYPE as documentType , a.member_idcredno as memberIdCredNo , a.csource_name as csourceName , a.csource_sys as csourceSys , a.TELEPHONE as telephone , a.ADDRESS as address , a.LEVEL_ID as levelId , a.LEVEL_NAME as levelName , a.CREDIT_LIMIT as creditLimit , a.USABLE_LIMIT as usableLimit , a.GUARANTEE as guarantee , a.start_date_q as startDateQ , a.end_date_t as endDateT , a.bt_member_status as btMemberStatus , a.modify_id as modifyId , a.GMT_CREATE as gmtCreate , a.GMT_MODIFY as gmtModify , a.USED_LIMIT as usedLimit , (select nvl(sum(c.repay_amount),0) from fc_bt_bill b,fc_bt_bill_detail c where b.id=c.bill_id and c.bill_d_status=1 and b.member_id=a.id) as norepayment , (select nvl(sum(c.repay_amount),0) from fc_bt_bill b,fc_bt_bill_detail c where b.id=c.bill_id and c.bill_d_status=2 and b.member_id=a.id) as repayment ,(SELECT nvl(sum(b.finance_blance),0) from fc_bt_bill b where b.member_id = a.id) as refund from FC_BT_MEMBER a where a.company_id_ex=#companyId#
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 广西| 昌黎县| 木兰县| 呼和浩特市| 盐源县| 沐川县| 成都市| 江川县| 林周县| 上思县| 长治县| 华容县| 南漳县| 康乐县| 铁岭县| 休宁县| 石屏县| 金塔县| 商南县| 西安市| 石台县| 北川| 衡阳县| 罗江县| 当阳市| 肃北| 楚雄市| 正镶白旗| 钦州市| 称多县| 阿克苏市| 新巴尔虎右旗| 遵化市| 久治县| 扶绥县| 安远县| 分宜县| 綦江县| 莱州市| 墨江| 兴化市|