Possible Duplicate:
sql server 2008 management studio not checking the syntax of my query
T-SQL Deletes all rows from a table when subquery is malformed
Please see the query below:
select * from tablea where reference in (
select reference from tableb)
The column reference
does not exist in tableb, so I expected to see a an error, however instead all the rows from table a are returned.
Why are all the rows from tablea returned?