H2 SQL语法

Posted boonya

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了H2 SQL语法相关的知识,希望对你有一定的参考价值。

SQL Grammar 

字面量

Value
Approximate numeric
Array
Boolean
Bytes
Date
Date and time
Dollar Quoted String
Exact numeric
Hex Number
Int
GEOMETRY
JSON
Long
Null
Number
Numeric
String
UUID
Time
Time with time zone
Timestamp
Timestamp with time zone
Interval
INTERVAL YEAR
INTERVAL MONTH
INTERVAL DAY
INTERVAL HOUR
INTERVAL MINUTE
INTERVAL SECOND
INTERVAL YEAR TO MONTH
INTERVAL DAY TO HOUR
INTERVAL DAY TO MINUTE
INTERVAL DAY TO SECOND
INTERVAL HOUR TO MINUTE
INTERVAL HOUR TO SECOND
INTERVAL MINUTE TO SECOND

日期时间字段

Datetime field
Year field
Month field
Day of month field
Hour field
Minute field
Second field
Timezone hour field
Timezone minute field
Timezone second field
Millennium field
Century field
Decade field
Quarter field
Millisecond field
Microsecond field
Nanosecond field
Day of year field
ISO day of week field
ISO week field
ISO week year field
Day of week field
Week field
Week year field
Epoch field

其他语法

Alias
And Condition
Array element reference
Field reference
Array value constructor by query
Case expression
Simple case
Searched case
Cast specification
Cipher
Column Definition
Column Constraint Definition
Comment
Bracketed comment
Compare
Condition
Condition Right Hand Side
Comparison Right Hand Side
Quantified Comparison Right Hand Side
Null Predicate Right Hand Side
Distinct Predicate Right Hand Side
Quantified Distinct Predicate Right Hand Side
Boolean Test Right Hand Side
Type Predicate Right Hand Side
JSON Predicate Right Hand Side
Between Predicate Right Hand Side
In Predicate Right Hand Side
Like Predicate Right Hand Side
Regexp Predicate Right Hand Side
Table Constraint Definition
Constraint Name Definition
Csv Options
Data Change Delta Table
Data Type or Domain
Data Type
Predefined Type
Digit
Expression
Factor
Grouping element
Hex
Index Column
Insert values
Interval qualifier
Join specification
Merge when clause
Merge when matched clause
Merge when not matched clause
Name
Operand
Override clause
Query
Quoted Name
Referential Constrai

以上是关于H2 SQL语法的主要内容,如果未能解决你的问题,请参考以下文章

H2 SQL语法

sql-maven-plugin 为 H2 存储过程定义抛出 SQL 语法错误

SQL 语句 org.h2.jdbc.JdbcSQLException 中的语法错误:

org.h2.jdbc.JdbcSQLSyntaxErrorException:SQL 语句“CREATE[*] SCHEMA DATABASE”中的语法错误; SQL 语句:

PostgreSQL模式下的h2数据库不接受PostgreSQL SQL语法

快速 SQL 问题:在 H2 中创建具有主键的表的正确语法?