On Feb 28, 9:37 pm, Todd Stout <[email protected]> wrote:
> Does H2 SQL support a general if-else construct?  I see that it does
> support if in the context of table create/drop, but I need something
> generally available to conditionally execute any H2 sql.

It may not be quite as general purpose as you need, but the CASE
statement may be helpful in many contexts.  It appears H2 supports it
wherever an expression can be embedded in SQL, including your basic
CRUD operations, though I have only used it within SELECT statements.
See:

http://www.h2database.com/html/grammar.html#case

HTH,
Eric
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to