我現(xiàn)在要根據(jù)tFavorites這個表里的ItemSysNo(也就是文章編號),來獲取tTechnoThesis這個表里的 Title(文章名)和ReadCount(查看次數(shù))然后還要獲取tFavorites這個表里的FavouritesTime(添加時間)!格式是string sql = "select a.SysNo,a.Title,a.CreateUserSysNo,a.Content,a.CreateTime,a.RankSysNo,a.TypeSysNo,a.Status,a.ReferenceClassSysNo,a.ReferenceSysNo,b.LevelIndex CustomerRank,"+ " case when a.IsCustomer = " + ((int)AppEnum.YNStatus.Yes).ToString() + " then b.CustomerId else '管理員' end as CustomerId"+ " from tCommentMaster a left join tCustomer b on a.CreateUserSysNo = b.SysNo where a.IsCustomer = " + ((int)AppEnum.YNStatus.Yes).ToString()+ " and b.SysNo = " + UserSysNo.ToString();這樣的格式寫``麻煩高人給個代碼``感謝萬分!?。Favorites表里有SysNo ItemSysNo CustomerSysNo FavouritesTime這4列我要代碼啊`我就是不會寫`才問的`麻煩`誰可以幫我寫一個??!感謝!
有關C# SQL 查詢語句!多表查詢,具體如下所示:
ibeautiful
2022-05-12 11:11:09