Apache Derby DB Error Code 42879 – The ORDER BY clause may not contain column ‘‘, s

In this blog post, let’s learn about the error message “42879- The ORDER BY clause may not contain column ‘‘, s” in Apache Derby Database and the description of the error.

Error Message

42879- The ORDER BY clause may not contain column ‘‘, s

Error Details

The ORDER BY clause may not contain column ‘‘, since the query specifies DISTINCT and that column does not appear in the query result.