数据库多表联查

 

 

 

 

 

-- CREATE TABLE Account(ID INT(11),name VARCHAR(255),class VARCHAR(255))
-- CREATE TABLE Exam(id INT,course VARCHAR(255),Score INT,Aid INT)

-- Select a.class,e.course,e.score from account a,Exam e where a.id=e.aid

-- SELECT a.class,e.course,AVG(e.score) from account a,Exam e where a.id=e.aid GROUP BY a.class,e.course

 

posted @ 2020-12-17 18:59  张泽涛的  阅读(69)  评论(0编辑  收藏  举报