How to use DESC command in H2 Database?

you can use the SHOW command just like: sql> show columns from users; “users” is the table name, the output would be something like: FIELD | TYPE | NULL | KEY | DEFAULT ID | INTEGER(10) | NO | PRI | (NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_B66F0B87_5AAA_4421_88AC_1E8CAC372596) USERNAME | VARCHAR(45) | NO | | NULL PASSWORD | … Read more

H2 database string to timestamp

According to my test, with H2 version 1.3.170, the milliseconds are not actually zero, but 069: select * from test; ID DATE 1 2012-09-17 18:47:52.069 The same happens if you run: call parsedatetime(’17-09-2012 18:47:52.69′, ‘dd-MM-yyyy hh:mm:ss.SS’); If you add a zero then it works: call parsedatetime(’17-09-2012 18:47:52.690′, ‘dd-MM-yyyy hh:mm:ss.SS’); H2 internally uses java.text.SimpleDateFormat, so it … Read more

How reliable is h2 database? [closed]

Will this pace be kept? That’s the plan. will it be supported by opensource community for long term? It’s hard to predict the future, I guess that’s why nobody replied to your question yet 🙂 I’m sure it will be supported, because enough people use it. H2 is used in many (open source and commercial) … Read more

Timeout error trying to lock table in h2

Yes, you can change the lock timeout. The default is relatively low: 1 second (1000 ms). In many cases the problem is that another connection has locked the table, and using multi-version concurrency also solves the problem (append ;MVCC=true to the database URL). EDIT: MVCC=true param is no longer supported, because since h2 1.4.200 it’s … Read more

Executing script file in h2 database

You can use the RUNSCRIPT SQL statement: RUNSCRIPT FROM ‘test.sql’ or you can use the RunScript standalone / command line tool: java -cp h2*.jar org.h2.tools.RunScript -url jdbc:h2:~/test -script test.sql You can also use the RunScript tool within an application: RunScript.execute(conn, new FileReader(“test.sql”));

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)