Question about relational delete query

J

ja

Hello,

I am new to ms access. I am trying to do a relational delete query.
Here is what I would do in ms sql:

delete t1
from t1, t2
where t1.f1 = t2.f1

I've been trying to to do it in ms access 2002 using the wizard,
desing and sql modes. I can't figure out what ms is requesting me to
do.

Would you help me?

tia

ja
 
J

John Spencer (MVP)

DELETE DistinctRow T1.*
FROM T1
WHERE T1.F1 in
(SELECT F2 FROM T2)

Simpler and faster (and possibly not working depending on your tables (primary
keys in both?))

DELETE DistinctRow T1.*
FROM T1 INNER JOIN T2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top