createview physics_fall_2009_watson as select course_id,room_number from physics_fall_2009 where building ='Watson';
其中physics_fall_2009本身是一个视图关系.
等价视图
这个physics_fall_2009_watson视图等价于:
1 2 3 4 5 6 7 8 9 10 11 12
createview physics_fall_2009_watson2 as( select course_id,room_number from( select course.course_id,building,room_number from course,section where course.course_id=section.course_id and course.dept_name = 'Physics' and section.semester='Fall' and section.year =2009 ) as T where building = 'Watson' );