2013/6/17 Cecil Westerhof <[email protected]>:
> 2013/6/17 Rami Ojares <[email protected]>:
>> You can also model an enum with relational concepts.
>> Let me show you.
>>
>> CREATE TABLE PERIOD (
>>     PERIOD_ID IDENTITY PRIMARY KEY,
>>     PERIOD_NAME VARCAHR(10) UNIQUE,
>>     MAYBE_SOME_OTHER_PERIOD_RELATED_ATTRIBUTE VARCHAR
>> );
>> Now insert the possible periods as tuples into the relation period.
>> INSERT INTO PERIOD VALUES (DEFAULT, 'daily', '...');
>> ...
>> Then define a constraint that prohibits inserts and updates to table PERIOD
>> This can be done utilizing H2's triggers.

I am properly not searching correctly, but I can not find how to do
that. Do you have a resource I could consult?

-- 
Cecil Westerhof

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to