Search code examples
javamysqlsap-commerce-cloud

How to remove all records of the table in Hybris?


In my development environment, I have added wrong data to my custom ItemType. Now I want to remove all data for that Type. Basically I want to truncate my ItemType table.


Solution

  • Run the below Impex (Change MyItemType with your ItemType)

    $targetType=MyItemType
    REMOVE $targetType[batchmode=true];itemtype(code)[unique=true]
    ;$targetType
    

    You can also run SQL query from HAC, refer this post for more detail