国产探花免费观看_亚洲丰满少妇自慰呻吟_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#
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 尚义县| 凭祥市| 蓬溪县| 阿坝| 上高县| 美姑县| 萝北县| 察哈| 怀化市| 博客| 墨江| 涿州市| 肃宁县| 新兴县| 华安县| 万源市| 潞西市| 宜良县| 昌都县| 诸城市| 北辰区| 亳州市| 密山市| 如皋市| 桓仁| 南木林县| 大埔县| 深水埗区| 临漳县| 阿拉善右旗| 华阴市| 巴青县| 海口市| 松溪县| 赤城县| 阳新县| 喀喇沁旗| 福建省| 苍溪县| 玉树县| 文水县|