Skip to content
Advertisement

Tag: sql

oracle sum by column without using union

I have this table: (supply table: how many products in storages) I should write a query to have this result: “Total_except_storage_30” has the total of every product in storages except storage number 30. For example first “total_except_storage_30” is for product_id 1000 in all storages except storage_id 30 and the second is for product_id 1001. *** I am not allowed to

JPA batch_size property does not work for native query

I’m trying to make a bulk insert with a native query. I’ve added batch_size property to the application.properties file But in the logs, I see that every insert processed separately. Is it possible to apply batching to native query? Answer If the entities use GenerationType.IDENTITY identifier generator, hibernate will silently disable batch inserts/updates. Please find the following link for the

Advertisement