Browse Source
This commit introduces a test to demonstrate how to define an alias in an SQL script executed against an embedded H2 database. Issue: SPR-15896pull/1508/head
Sam Brannen
7 years ago
3 changed files with 35 additions and 3 deletions
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
DROP ALIAS IF EXISTS REVERSE; |
||||
|
||||
-- REVERSE function borrowed from http://www.h2database.com/html/grammar.html#create_alias |
||||
CREATE ALIAS REVERSE AS $$ |
||||
String reverse(String s) { |
||||
return new StringBuilder(s).reverse().toString(); |
||||
} |
||||
$$; |
||||
|
||||
INSERT INTO users(first_name, last_name) values('Sam', 'Brannen'); |
Loading…
Reference in new issue