• I'm still not sure, but yes, the statement above deletes ALL rows that contain the free spaces in the two columns.

    If you only want delete the last row there are several possibilities. For the beginning I wold take an easy way. Using the top clause you can select the primary key value of the "last row" in your table. Then you can delete the row using the primary key value.

    Let's say there is a column InsertDate in your table und you want to delete only the last inserted row with blanks. Let's also say there is a primary key column Named "Id" in your table.

    This would be:

    declare @IdToDelete int;

    select @IdToDelete = (

    select top (1) Id

    from dbo.TableX

    where col1 = '' and col2 = ''

    order by InsertDate desc

    )

    delete from dbo.TableX where Id = @IdToDelete

    Again use a select instead of a delete statement to check the rows the query returns.

    For a more exactly reply you really should post the table structure you use and some sample data.