V
V
vsngn2016-05-21 20:04:16
MySQL
vsngn, 2016-05-21 20:04:16

How to remove values ​​of one column from another?

There are two tables. It is necessary to remove rows from one table that contain values ​​from a column of another table.
Those. two columns from two tables are compared, if the cell value is present in another table, then the row with this matched value is deleted from the first one.
How can you do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2016-05-21
@melkij

delete from foo where fieldname in (select filedname2 from bar)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question