English

Activity table is related to student table and every student has been asked to enroll for minimum 2 activities. While checking the records select student id from activity -

Advertisements
Advertisements

Question

Activity table is related to student table and every student has been asked to enroll for minimum 2 activities. While checking the records select student id from activity; lots of duplicate entries were found as students are enrolling for more than one activity. It is becoming difficult to understand who all have still not enrolled for any activity. We can use ______ clause with student_id to resolve the issue.

Options

  • Unique

  • Distinct

  • Where

  • Select

MCQ
Fill in the Blanks

Solution

Activity table is related to student table and every student has been asked to enroll for minimum 2 activities. While checking the records select student id from activity; lots of duplicate entries were found as students are enrolling for more than one activity. It is becoming difficult to understand who all have still not enrolled for any activity. We can use distinct clause with student_id to resolve the issue.

shaalaa.com
SQL for Data Query
  Is there an error in this question or solution?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×