Skip to content
RED SAGSkills
hard20 pts · first answer countssqlsecurity

Sorting by a user-chosen column

An endpoint accepts ?sort=created_at. A developer writes ORDER BY $1 with the value as a bound parameter, and the results are not sorted. What is the right approach?

Choose one answer