On this page

    Deleting Apache Iceberg Tables

    The DELETE command deletes rows from a table.

    Syntax
    DELETE FROM <table_path>.<table_name> [AS alias]
    [ WHERE where_conditions ]
    

    Parameters

    <table_path>

    String

    The path in which the table is located.


    <table_name>

    String

    The name of the table with data that you want to delete.


    WHERE where_conditions

    String

    (Optional) The filter for specifying which rows of the table to delete.

    note:

    Join conditions are not supported in WHERE clauses. If you need to use a join condition, use a correlated subquery instead.

    Example of an unsupported DELETE command
    delete from orders 
      using returns
      where orders.order_id = returns.order_id;
    
    Equivalent DELETE command using a correlated subquery
    delete from orders 
      where exists(select 1 from returns where order_id = orders.order_id)