×
Menu
Index

    SQL Command DELETE

     
    The DELETE command has the following specification:
     
    DELETE [*]
    FROM TableName
    [WHERE logical_expression]
     
    where:
    * - used for compatibility purpose. A delete statement applies to an entire row, so there is no need to identify the fields in the table.
     
    TableName – specify the name of the table for which the command is applied.
     
    logical_expression – identifies those rows that must be deleted from the table.
    When no logical expression is provided, all the rows from the table will be deleted.
    However, the table itself will still remain in database and it will have the same structure.
    In order to delete the table, use the FTP DELE command on the table file.
     
    Examples
    delete * from cards
    delete from cards
    delete * from cards where id=1
    delete * from cards where id=1 OR id=2