h2 « Operation « Java Database Q&A





1. SQL (Java, h2): What's the best way to retrieve the unique ID of the single item I just inserted into my database?    stackoverflow.com

My current method is this:

SELECT TOP 1 ID FROM DATAENTRY ORDER BY ID DESC
This assumes the latest inserted item always has the highest unique ID (primary key, autoincrementing). Something smells ...

2. Inserting a long text in H2 Database from an SQL script    stackoverflow.com

I'm trying to run a sql script using H2's runscript. One of the table contains a longtext type which stores an xml document (from an SAP database) So the Insert statement contains the ...

3. Query on indexed table in sql database versus using own HashMap    stackoverflow.com

I have a performance question in java. I have a large indexed table in a sql database (in this case a H2 Database, but the question can be applied to any sql ...

4. Insert into view in h2 database    stackoverflow.com

edit: I want to add values to a table (paziente) working with a view of that table (viewPaziente) and not directly the table. edit2: Found a stupid mistake in the code, now ...

5. SQL exception preparing query with ORMLite    stackoverflow.com

I am using an ORM (ORMlite) and all my calls are going well until I get the following error.

Exception in thread "main" org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement ...

6. Can H2 Database query a CSV file containing multiple sections of different record groups?    stackoverflow.com

I receive data in a CSV (kind of) format, in which each entity is represented by multiple sections of different record groups. In this fictitious example (below) I represent a number ...

7. With H2 Database can I perform a SQL query on CSV text read from a Java Reader e.g. StringReader?    stackoverflow.com

Is there a way to perform SQL queries on CSV text held in memory and read in from a Java Reader e.g. StringReader. org.h2.tools.Csv.read(Reader reader, String[] colNames) would allow me to retrieve ...

8. SQL Queries from netbeans on H2 database    forums.netbeans.org

Hi, I have a connection on H2 database defined under Services->Databases. But when i try to execute query that has an aggregate function or some calculation included in the select clause ...