0

What I'm trying to do is delete 1 row from this table using steam_id and the highest unique_id with said steam_id.

picture of table

In this picture, the first two entries have the same steam_id (intentional), what I'm trying to do is remove entry 2 based on the fact that its unique_id is higher than entry 1 however I do not want entry 1 removed.

This is currently what I have:

    "DELETE FROM hwarns WHERE steam_id = '76561198277645499'"

I just don't know what else I need to add, I tried adding a MAX clause however that failed and I have no clue what exactly to look up to find answers

NOTE: THIS IS FOR THE GAME 'Garry's Mod'

(sorry for bad explanation)

1 Answer 1

1

DELETE FROM hwarns WHERE unique_id= (select max(unique_id) from hwarns where steam_id = '76561198277645499')

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.