How to write Liquibase script to hash the data of a column using update command

While I was trying to hash the owner_name column with this set of Liquibase Script as suggested by the Corda here

<changeSet author="My_Company" id="replace owner_name with owner_name_hash">
<addColumn tableName="iou_states">
    <column name="owner_name_hash" type="nvarchar(130)"/>
</addColumn>
<update tableName="iou_states">
    <column name="owner_name_hash" valueComputed="hash(owner_name)"/>
</update>
<dropColumn tableName="iou_states" columnName="owner_name"/>

I was getting the following error:

Reason: liquibase.exception.DatabaseException: Invalid parameter count for “HASH”, expected count: “2…3”; SQL statement

The reason I am not understanding here what are the other fields we need to give to the hash function.

Can any one help me with this, and provide the correct script which will do the hashing of the column in table. Many Thanks in Advance

Hi @ManikantaReddy - welcome to the Liquibase Community!

I don’t think this error is specific to liquibase. The example you linked doesn’t include any hashing, and the error you posted indicates that there are missing parameters in the script. This link is not exactly the same thing because it’s C# and not SQL, but it shows an example:
https://social.msdn.microsoft.com/Forums/en-US/dc142c3e-05a6-4862-8f2d-22f4dc504c11/how-to-resolve-the-exception-quotparameter-count-mismatchquot-is-thrown-from?forum=csharpgeneral#:~:text=What%20Cheong%20is,nulls%20for%20both.

This post from StackOverflow might be more directly helpful: php - Error when preparing a multiple insert query - Stack Overflow