Computer Science, asked by amitthorat919, 8 months ago

Create a view named course_student_details which has the following attributes. Student id, first name, and course name which they have registered.

Answers

Answered by caskes7
19

create view course_student_details as

select s.first_name, s.last_name, c.course_name

from students s

inner join registration r on r.stud_id = s.stud_id

inner join course c on c.course_id = r.course_id

Explanation:

Answered by Hansika4871
0

The view with the following attributes is as follows:

  • A view is a virtual table in SQL that is created from the result set of a SQL operation.
  • A view is similar to a table in that it has rows and columns. Fields from one or more real tables in the database are used in views.
  • You can populate a view with SQL statements and functions to portray data as if it came from a single table.
  • The code is as follows:

Create View_Student_Details as

select S.STUDID, S.FIRSTNAME, C.COURSENAME

FROM STUDENT S

INNER JOIN REGISTRATION R ON R.STUDID=S.STUDID

INNEW JOIN COURSE C ON C.COURSEID=R.COURSEID

#SPJ3

Similar questions