Skip
Arish's avatar

22. Practice - Multi-Line Comments


Exercise: Document a Query

Add a multi-line comment explaining this query.

Solution

sql
1/*
2  Query: High achievers by course
3  Purpose: Find students scoring above 85
4  in their respective courses
5*/
6SELECT course, name, marks
7FROM students
8WHERE marks > 85
9ORDER BY course, marks DESC;

Comment Summary

TypeSyntaxUse
Single-- commentQuick notes
Multi/* comment */Long explanations