有人可以帮助我,我有2个表EXISTS IN查询如何?
financeaccountcurrencymapping和ownedaccount。
我想选择那些其字段legalEntity_id是something的financeaccountcurrencymapping。
这是我到目前为止。
SELECT
FROM financeaccountcurrencymapping
WHERE ownedAccount_id EXISTS IN (
SELECT id
FROM ownedaccount
WHERE legalEntity_id = ??);
在表中的字段有:
'financeaccountcurrencymapping'
- ID
- moneyCurrency
- accountForCash_id
- ownedAccount_id
'ownedaccount'
- ID
- 名
- legalEntity_id
- assetOrLiability
- assetType
- depositoryType
- liabilityType
- multipleCurrency
- 货币
- 描述
从SELECT更改为DELETE。 – Tom