How to limit integer values to 16bit only in SQLite fields -


i using sqlite db sqlite expert personal admin tool design , add data.

my question is, how limit value of int fields 16bit user cannot add number > 65535?

please suggest other better sqlite admin tool if using not great.

thanks

you can create table in question constraint;

create table test ( col1 int, constraint my_limit check (col1<65536) ); 

which won't let insert numbers larger 65535 in column. (you may want remember limit below 0 if that's requirement)

sadly can't add constraint existing table in sqlite.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -