On Tue, Oct 23, 2012 at 12:15 AM, Rami Ojares <[email protected]> wrote:

> What is the difference between varchar and text.  H2 specifically rejects
>> using unique or primarykey for text fields.
>>
>
> I am looking at the list of types supported by h2
> http://www.h2database.com/**html/datatypes.html<http://www.h2database.com/html/datatypes.html>
> I don't see type text mentioned.
> I remember that type from mysql though.
>
> Anyway, if you don't know what type text is why do you want to use it?
> Just use varchar.
>
>
> > Also, this does not solve the problem of caching the preparedStatement
> in the function.
>
> Consider using merge statement
> http://www.h2database.com/**html/grammar.html#merge<http://www.h2database.com/html/grammar.html#merge>
>
>
>
I'd say yes, to both suggestions. varchar is a standard SQL type suppored
by H2, and while H2 may support that type in some of its compatibility
modes, it also may not

Just make you string colump a primary key, and use MERGE INTO ...


> --
> 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 h2-database+unsubscribe@**
> googlegroups.com <h2-database%[email protected]>.
> For more options, visit this group at http://groups.google.com/**
> group/h2-database?hl=en <http://groups.google.com/group/h2-database?hl=en>
> .
>
>


-- 
   Vasile Rotaru

-- 
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