Posted by davidaustinarcher on 10/25/07 11:27
Hello,
I run the following query on a database (SQL 2005):
delete from person where pers_companyid in (select pers_companyid from
company where comp_expiry is not null)
I wanted to delete all people associated with a company which had an
expiry date. The mistake I made was that the column pers_companyid
does not exist. It should have been comp_companyid.
However, the query ran anyway and deleted all records from my person
table? If I run the subquery on its own then it doesn't run as the
column is missing.
Shouldn't I have got an error running this query?
Thanks,
David
Navigation:
[Reply to this message]
|