The query is sent to the database for execution, and results are returned.
When a SQL query is executed using JDBC, the query is transmitted to the database server, which processes it and returns the result. In a Java application, this involves creating a Statement or PreparedStatement, executing the query, and processing the results in a ResultSet. For example, fetching a list of users from the database for an e-commerce platform involves executing a SELECT statement.
Additional Notes
What happens when you execute an SQL query using JDBC?