You can enforce a column's TYPE using CHECK() and/or TRIGGER.
It might be expensive if used on all columns for large inserts
or updates; depends on what the priorities are.

INTEGER, REAL and BLOB are easy to enforce with triggers.
typeof( NEW.cEnforceReal ) <> 'real'
typeof( NEW.cEnforceInteger ) <> 'integer'
typeof( NEW.cEnforceBlob ) <> 'blob'

Date: depends on how dates are stored.
CREATE TABLE [tEnforceDate] (
 [cDate] TEXT CHECK( cDate LIKE'____-__-__' )
)

I put together some notes on it:
http://www.sqlight.com/enforce-type-triggers/

Any corrections/additions would be appreciated.

Stan...
igiga &&& @ &&& swbell &&& . &&& net



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to