View : Create a virtual table between the linked tables!
Step: Open the Database ' selected database ', right click ' View ', select ' New View '. Then add
' selected database ' has an associated ' table ', select the View to display the ' columns ', then close, save the new view and create the complete!
--drop View Xueshengfenshu--deleting views
--alter View XKF-- Modifying a view is removing overrides!
only used in front Top number after before you can use the Order by . Aggregate functions cannot be used in views
Create View Xueshengfenshu
As
Select Student.sno,sname,ssex,sbirthday,class,score. Cno,degree from Student
Join score on Student.sno=score. Sno- This is the complete CREATE VIEW statement!
Select *from Xueshengfenshu
--students. Course, score three-table view!
CREATE VIEW XKF
As
Select Student.sno,sname,ssex,sbirthday,class,score. Cno,degree,course. Cname from Student
Join score on Student.sno=score. Sno
Join course on course. Cno=score. Cno
Select *from XKF
Create a view in the database