复杂model 生成的sql语句是俩条而不是关联查询的吗? 返回

下面是生成的sql语句
exec sp_executesql N'SELECT [Id],[Name],[BirthDay],[IdCard],[Sex],[Company],[Telephone],[Email],[Education],[GraduateSchool],[Major],[GraduationDate],[WorkDate],[WorkingLife],[BeGoodAt],[Address],[Authentication],[AuthenticationDate],[AuthenticationLevel],[Status],[CreateUser],[CreateTime] FROM [T_StaffInfo] WHERE [Id] IN (@InPara0) ',N'@InPara0 int',@InPara0=1
exec sp_executesql N'SELECT [Id],[CompanyName],[CompanyType],[LegalRepresentative],[RegisteredCapital],[DateOfEstablishment],[BusinessScope],[CreditCode],[Address],[Telephone],[Fax],[LegalRepresentativePhoto],[BusinessLicensePhoto],[QualificationDocumentsPhoto],[ServicePromisePhoto],[Remark],[Status],[CreateUser],[CreateTime] FROM [T_Company] WHERE ( [Id] = @Id0 )',N'@Id0 int',@Id0=1
热忱回答(1)
-
fate stay night VIP0
2018/5/24是的 考虑性能就要用JOIN的方式实现
0 回复