我在 SQL Server 中的查询遇到了一个奇怪的行为
我有两个表PrepaidTransactions,BillingData我正在执行以下查询
Select *
from PrepaidTransactions
where customer_Id in
(Select customer_Id
from BillingData
where CommunityId = 10004)
该列customer_Id不属于 table BillingData。PrepaidTransactions查询正在执行并返回表中的所有记录,而不是显示错误
但是当我运行以下查询时
Select customer_Id
from BillingData
where CommunityId = 10004
它显示错误
列名“customer_Id”无效。
谁能告诉我为什么第一个查询没有显示任何错误?