I want to update all fields of a table that has value of colum NAME as \'PCNAME\'. The table name which i want to update is XYZ.I want to update only some fields and not kee
seanizer's answer is correct (+1) and a bulk update would be indeed nice for this use case. But you must take some precautions with bulk update operations. To paraphrase the JPA specification:
My suggestion would thus be to at least increment the version column to avoid concurrency problem with other threads:
UPDATE XYZ xyz
SET xyz.name = :newname, xyz.version = xyz.version + 1
And to perform it in a separate transaction or before loading any XYZ as previously explained.