Skip to content
Advertisement

SQL query returns void in Spring Boot application but does not in H2

Good evening,

I’m sure I’m missing something about how to write queries in a Spring Boot application and would appreciate correction.

SQL query in h2-console:

returns ‘1’

in Spring application:

returns null

Error text:

What is wrong with the second query?

Let me know if you need the full stack trace.

Thanks

Advertisement

Answer

Remove single inverted commas from the query.

Change

To

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement