X
X
xkreativ2022-01-19 17:48:19
PHP
xkreativ, 2022-01-19 17:48:19

How to remove the following duplicate rows mysql?

61e8241bbf904540356334.png

How to edit the code so that the next duplicate entries are removed.
Should be like this:
id_user | id_post
2 | 16
4 | 12
1 | 25

There is the following code

SELECT `id_user`, `id_post` FROM `posts`
ORDER BY RAND()
LIMIT 10

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sanya Hihi Haha, 2022-01-19
@ValarMayar

SQL DISTINCT statement

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question