SQL内联多个表

SQL多个表组合成一个表:

            strSql.Append(@"Select N.NotificationOptionId,
                                   S.FullName,
                                   No.Title,
                                   N.SortCode,
                                   N.Content,
                                   N.CreateDate,
                                   N.CreateUserId,
                                   N.CreateUserName,
                                   N.ModifyDate,
                                   N.ModifyUserId,
                                   N.ModifyUserName                                  
                              From (NotificationOption As N
                                   Inner Join Sys_Company AS S On S.CompanyId=N.SchoolCode)
                                   Inner Join Notifications AS No On No.NotificationId=N.NotificationId
                                   Where 1=1");

 

转载于:https://www.cnblogs.com/yechangzhong-826217795/p/5683807.html

你可能感兴趣的:(SQL内联多个表)