I ran into a strange behaviour by a query in SQL Server
I have two tables PrepaidTransactions
and BillingData
and I am executing the following query
Select *
from PrepaidTransactions
where customer_Id in
(Select customer_Id
from BillingData
where CommunityId = 10004)
The column customer_Id
doesn't belong to table BillingData
. Instead of showing error the query is executing and returning all the records from the PrepaidTransactions
table
But when I run the following query
Select customer_Id
from BillingData
where CommunityId = 10004
it is showing an error
Invalid column name 'customer_Id'.
Can anyone please let me know why the first query is not showing any error?