简体   繁体   English

引起:org.h2.jdbc.JdbcSQLSyntaxErrorException:Function “SYSUTCDATETIME”未找到; SQL 声明:[90022-200]

[英]Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Function "SYSUTCDATETIME" not found; SQL statement:[90022-200]

I am testing the repository class with insert query and facing issue:我正在使用插入查询测试存储库 class 并面临问题:

ERROR:错误:

Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Function "SYSUTCDATETIME" not found; SQL statement:
insert into table name (cloumns1..x) values (?, ?, ?, SYSUTCDATETIME(), ?, ? , ?, SYSUTCDATETIME(),?); [90022-200]

VERSION:版本:

I am using unit juniper version 5.8.x我正在使用 unit juniper 版本 5.8.x

Expectation Can someone please help期望有人可以帮忙吗

In h2 there is no SYSUTCDATETIME() this function exists in SQL Server, for h2 you have to use CURRENT_TIMESTAMP , for example:在 h2 中没有SYSUTCDATETIME()这个 function 存在于 SQL 服务器中,对于 h2 你必须使用CURRENT_TIMESTAMP ,例如:

INSERT INTO table_name (cloumns1, .., x) 
values (?, ?, ?, CURRENT_TIMESTAMP, ?, ? , ?, CURRENT_TIMESTAMP, ?);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 org.h2.jdbc.JdbcSQLSyntaxErrorException:找不到列; SQL 声明 [SPRINGBOOT] - org.h2.jdbc.JdbcSQLSyntaxErrorException: Column not found; SQL statement [SPRINGBOOT] org.h2.jdbc.JdbcSQLSyntaxErrorException:SQL 语句中的语法错误 - org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement org.h2.jdbc.JdbcSQLSyntaxErrorException:找不到列“USER0_.PROFILE_ID”; SQL 声明: - org.h2.jdbc.JdbcSQLSyntaxErrorException : Column "USER0_.PROFILE_ID" not found; SQL statement: Spring SQL:org.h2.jdbc.JdbcSQLSyntaxErrorException:SQL 语句中的语法错误“;预期为“标识符”,使用 INSERT INTO 时 - Spring SQL: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "; expected "identifier", when using INSERT INTO 如何修复 org.h2.jdbc.JdbcSQLSyntaxErrorException:SQL 语句中的语法错误需要“标识符” - How to fix org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement expected "identifier" Spring JPA H2 数据库获取 org.h2.jdbc.JdbcSQLSyntaxErrorException 未找到表 - Spring JPA H2 database get org.h2.jdbc.JdbcSQLSyntaxErrorException Table not found H2版本升级后org.h2.jdbc.JdbcSQLSyntaxErrorException - org.h2.jdbc.JdbcSQLSyntaxErrorException after H2 version upgrade 插入时间戳记时,H2 org.h2.jdbc.JdbcSQLSyntaxErrorException - H2 org.h2.jdbc.JdbcSQLSyntaxErrorException when inserting a Timestamp org.h2.jdbc.JdbcSQLSyntaxErrorException h2 数据库 java - org.h2.jdbc.JdbcSQLSyntaxErrorException h2 database java org.h2.jdbc.JdbcSQLException:未找到架构“MYAPP”; SQL语句 - org.h2.jdbc.JdbcSQLException: Schema “MYAPP” not found; SQL statement
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM