Most voted "h2database" questions
H2 is a Java SQL database. Its main features are fast, open source, use the JDBC API, run in memory and be compact.
Learn more…17 questions
Sort by count of
-
5
votes1
answer556
viewsCondition in Select - SQL
I have a table where we store the priorities of output of supplies per customer, for example: cliente | codigosuprimento | prioridade | quantidaestoque 1 | 500 | 1 | 20 1 | 501 | 2 | 10 1 | 502 | 3…
-
4
votes1
answer739
viewsHow to connect JDBC (H2 Database) in PHP?
How to connect a JDBC database (specifically H2 Database) in PHP? The database is in a single file with extension .db
-
3
votes3
answers800
viewsSpring Data JPA does not recognize the SQL 'Limit' command?
I am creating a REST API, using Spring Boot, which, using data from a table, displays random phrases. Giving a Google, I found that it is possible to generate random results through pure SQL: SELECT…
-
1
votes0
answers464
viewsError opening H2 Database
I have been trying to open a H2 Database file that is not corrupted and H2 Database has returned me the following error: Encryption error in file "C:/Users/Administrator/test.h2.db" [90049-189]…
-
1
votes1
answer171
viewsChanging the name of a table in the H2 Database Engine
I’m trying to change the name of a table in H2, but I can’t find the syntax. Does anyone know?
-
1
votes1
answer237
viewsJava: Error while recovering data from Resultset, even though query is correct
My problem is this: I am making a Java application integrated with the H2 database. I do a query via PreparedStatement and saved in a ResultSet. So far so good, no Exception is generated. In the…
-
1
votes2
answers215
viewsHow to map class fields with names other than database columns?
I’m using IDE Intellij. I have the following model: @Entity(name = "carro") @Data public class Carro { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String nome;…
-
0
votes1
answer69
viewsHow to set UTF-8 encoding in data.sql files for starting H2 data based with Spring?
I have a Spring JPA application with an H2 database. I created a data.sql file with some INSERTS and this script is running normally on application startup, but the special characters are being…
-
0
votes1
answer313
viewsData being deleted from H2 database with Spring Boot
I am making an application with Spring Boot and using the H2 bank. When I register a person, they get id 1, if I register someone else gets id 2 and so on, only if I restart the bank I lose…
-
0
votes1
answer82
viewsMerge the results of two SQL’s commands into H2
I created the following Query: SELECT s FROM SuprimentosPedidos s WHERE s.codigoModeloImpressora = :codigoModeloImpressora AND s.codigoEmpresa = :codigoEmpresa and s.prioridadeSaida = 1 ORDER BY…
-
0
votes0
answers749
viewsHow to find out in SQL which is the primary key of the table?
I am learning SQL, and ran into the following problem: I need to know which of the columns is the primary key of the table. Have some command I can use in SELECT to get as return that information?…
-
0
votes1
answer533
viewsDo I need to include classes mapped in persistence.xml? Java-Eclipse-Maven-Hibernate-H2database
I’m trying to set up a Maven project in Eclipse with Hibernate and H2 Database. So I’m trying to understand the persistence.xml settings, which I had to create. One question is: do I need to include…
-
0
votes1
answer930
viewsJpa Hibernate does not create table in H2
Good night, I am new in Java development - Spring Boot and following a tutorial I can not generate the table in the H2 database, already tried to make some changes in the application.propreties but…
hibernate jpa spring-boot h2database spring-tools-suiteasked 5 years, 5 months ago JULIO CESAR SILVA DE FREITAS 23 -
0
votes0
answers180
viewsSpringboot, Hibernate does not create tables in the H2 database
Hello I’m trying to use bank H2 with springboot, but tables are not being created in the database automatically. application properties #DataSource spring.datasource.url=jdbc:h2:file:~/fintech…
-
-1
votes1
answer213
viewsComposite primary key definition syntax in the H2 Database engine
I am trying to define a primary key composed of two columns when creating a table in the H2 Database Engine (http://www.h2database.com/html/main.html), but I couldn’t find the syntax in the manual.…
-
-1
votes1
answer37
viewsWhen adding Authentication Filter in Spring security, it is not possible to access the H2-console
Hello, I created my spring security configuration class, but when adding the authorization filter my access to H2-console was lost: @Configuration @EnableWebSecurity…
-
-2
votes1
answer35
viewsHow to generate a json with an object array
Hello, I’m trying to create a REST API, where in the GET method I should return a JSON in this style: {questions:[{ id: 1, question: 'pergunta 1', answers: [{ answerText: 'resposta 1',…
spring spring-boot spring-jpa h2databaseasked 3 years, 9 months ago Luis Gustavo Rodrigues Oliveir 3