How could I do a self-checking query in SQL, ie I would like to query such a value and then delete it in only one query. EX:
select * from usuarios where nome=lucas
that is, to get the result of searching and deleting.
I know I would then be able to delete using:
DELETE FROM usuarios WHERE nome = lucas
But this is not what I want, I was wondering if in just one query it is possible to return the value and then delete then.