Insert SelectInsert und Update mit select in HQL
INSERT INTO FIN_COA_POSTED (DEBIT_AMOUNT,CREDIT_AMOUNT)
SELECT DEBIT_AMOUNT+__amount,CREDIT_AMOUNT FROM FIN_COA_POSTED WHERE
ID =(SELECT MAX(ID) FROM FIN_COA_POSTED WHERE FK_CHART_OF_ACCOUNT=5);
Update-Select
UPDATE fin_bank_account AS t1 JOIN
(SELECT ID, BALANCE+__amount AS totalamount FROM fin_bank_account WHERE
ID=7)
AS t2 ON t1.id =t2.id
SET t1.balance =t2.totalamount;
Hinweis
(IN __amount DOUBLE)
kann w E in der Lage, corospondance HQL in Hiberante zu schreiben? Aktualisieren Sie PLZ. Dank