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");

 

posted @ 2016-07-19 10:38  代码沉思者  阅读(1561)  评论(0编辑  收藏  举报