# Working with User Input

Pass user input to a query as a ? parameter instead of joining it into the SQL string, so nobody can run a SQL injection attack on your database.

![Cheat sheet: Working with User Input](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/8283e6ca74fb4b8a8d4204fe54c3c698.webp)

- Category: Java
- Level: Journeyman
- Tags: java, sql
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/working-with-user-input-cheat-sheet
