sql delete - I want to leave always one record if table record count = 1 with SQL -
I can delete records with this SQL section,
remove from table ID = 2
I always need to leave a record if the calculation of the table = 1 is also "id = 2". How can I do this?
Add a WHERE segment to ensure there is more than one line:
Delete from the table id = 2 and (tab from selection number (*)) & gt; 1
Comments
Post a Comment