INNER JOIN(内连接):取得两个表中存在连接匹配关系的记录 $sql="SELECT * FROM subject as a INNER JOIN e_user as b ON a.uid=b.id"; //也可以用以下方法 SELECT article.aid,article.title,user.username FROM article,user WHERE article.uid = user.uid LEFT JOIN (左外连):会取得左表(table1)全部记录,…
public IList<MenuModel> GetAllMenu() { using (IMMEntities context = new IMMEntities()) { var menuList = from A in context.BASE_FUNCTION join B in context.BASE_MENU on A.FUNCTION_ID equals B.FUNCTION_ID select new MenuModel { Function = new FunctionM…