S
S
Sasha Brahms2015-11-20 21:30:13
PHP
Sasha Brahms, 2015-11-20 21:30:13

Delete everything but *sql?

There are a lot of lines, you need to delete everything except a certain one, for example,
all records with user_id = 21, but leave the one with delete = not
?
As far as SQL queries are not selenium, I don’t understand how to use the NOT / IN operator
Please tell me

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan Fedoseev, 2015-11-20
@Dlike

I read documentation aloud. Expensive. Prepayment.
delete from table where not ((id=21) and (delete=not))
write down your question in English. 90% of the questions will end. The rest is in the dock.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question