且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用SQL 2012从数据库检索数据时获取重复记录

更新时间:2023-01-29 20:39:43

如果您的帐单表包含同一案例的多个帐单信息 JOIN 将为每个结算信息返回一个完整的行。一个简单的例子来说明这个:



caseID = 5



账单信息A for caseID 5

账单信息B for caseID 5



将返回以下行:



5与A

5与B
If your billing table contains more than one billing information for the same case the JOIN will return a complete row for each billing info. A simple example to illustrate this:

caseID = 5

billing info A for caseID 5
billing info B for caseID 5

will return these rows:

5 with A
5 with B