'how to add "DATE_ADD" function for H2 like works for mySQL
Im using mySql for db and h2db for testing. so I want to keep the query works for both db.
SELECT * FROM USERS
WHERE DATE_ADD(CAST(createDate as DATETIME),INTERVAL createTime HOUR_SECOND) <= #{today}
AND gender = 'Male'
this is my query, and I get no Function 'DATE_ADD' error every time because H2 is not support 'DATE_ADD' function then I tried to make user-defined function for H2
CREATE ALIAS IF NOT EXISTS DATE_ADD FOR "xxx.yyy.zzzz.dateAdd" then no more function error.
so my question is what is inside "xxx.yyy.zzzz.dateAdd"'s code looks like i have no Idea please help me! sorry for bad english.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
