SQL 2000
Hi All,
I have Table1 and Table2. Table2 has a list of unique id's that I would like to delete the whole row from table1 with the same unique id.
I have been doing it like so:
But like this I have to type in the id's. It's OK if there are a few.
So I would like to know how to delete all rows from Table1 where Table2 and table1 unique id is equal. (an inner join)
Thanks in advance.
Michael
Hi All,
I have Table1 and Table2. Table2 has a list of unique id's that I would like to delete the whole row from table1 with the same unique id.
I have been doing it like so:
Code:
delete *
from table1
where unique_id in (6,8,9)
But like this I have to type in the id's. It's OK if there are a few.
So I would like to know how to delete all rows from Table1 where Table2 and table1 unique id is equal. (an inner join)
Thanks in advance.
Michael