Analyze Table Syntax Error

2019-08-21 08:18发布

问题:

The following sql statement raises a syntax error:

analyze table my_table sample_size 0;

This is the raised error:

Syntax error in SQL statement "ANALYZE TABLE MY_TABLE SAMPLE_SIZE[*] 0 "; expected "integer";

The official documentation gives the following:

ANALYZE [TABLE tableName] [SAMPLE_SIZE rowCountInt]

(...) The value 0 means all rows are read.

How to workaround this problem?

H2 1.4.196

回答1:

The error results from a bug in the h2 database parsing code. A fix has been sent.

I don't know in which version it willl be available.