How to complete the requirement by writing an oracle sql?
From: Quanwen Zhao <quanwenzhao_at_gmail.com>
Date: Mon, 10 Apr 2023 22:52:45 +0800
Message-ID: <CABpiuuQb3rFCDVH6pcT8uFsCH6QWt4BWYnMeZ6AUPP8YXtzRNQ_at_mail.gmail.com>
Hello there,
Date: Mon, 10 Apr 2023 22:52:45 +0800
Message-ID: <CABpiuuQb3rFCDVH6pcT8uFsCH6QWt4BWYnMeZ6AUPP8YXtzRNQ_at_mail.gmail.com>
Hello there,
I've a requirement about how to retrieve the final calc result from two number of tables (A and B) from oracle database, such as:
table A:
TS_NAME USED_SIZE(MB)
> -------------- ------------------------
> a 10
> b 20
> c 30
> d 40
> e 50
table B:
TS_NAME USES_SIZE(MB)
> --------------- ------------------------
> a 2
> b 6
> e 20
I expect to acquire the result like this:
TS_NAME USED_SIZE(MB) --------------- ------------------------- a 8 b 14 c 30 d 40 e 30
How to use the SQL to finish it?
Best Regards
Quanwen Zhao
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Apr 10 2023 - 16:52:45 CEST