摘要: 习题地址:http://sqlzoo.net/4a.htm表结构: teacher(id, dept, name, phone, mobile) dept(id, name) teacher.dept = dept.id1a.List the teachers who have NULL for their department.select name from teacher where dept is null1b.Note the INNER JOIN misses the teacher with no department and the department ... 阅读全文
posted @ 2012-06-02 13:10 Leo Forest 阅读(2145) 评论(0) 推荐(0) 编辑
摘要: 习题地址:http://sqlzoo.net/3.htm表结构: movie(id, title, yr,director) actor(id, name) casting(movieid,actorid, ord)1b.Give year of 'Citizen Kane'.select yr from moviewhere title = 'Citizen Kane'1c.List all of the Star Trek movies, include theidtitleandyr. (All of these movies include the wo 阅读全文
posted @ 2012-06-02 11:46 Leo Forest 阅读(2336) 评论(0) 推荐(0) 编辑
摘要: 习题地址:http://sqlzoo.net/3b.htm表结构: ttms(games,color, who,country) country(id, name) ttms.county = county.id1b.Show the who and the color of the medal for the medal winners from 'Sweden'.select who, colorfrom ttms join countryon (ttms.country = country.id)where country.name = 'Sweden'1 阅读全文
posted @ 2012-06-02 00:40 Leo Forest 阅读(466) 评论(0) 推荐(0) 编辑