I would like to add a check constraint which determines if a string
contains all digits, ie.

sqlite> select zip_code from zip_codes where regexp(zip_code,
'^[[:digit:]]+$');

However, this generates the error:

Error: no such function: regexp

Searching through sqlite.org points that this function may not be included.

So, is there any equivalent to this kind of functionality?  I can check at
the application level beforehand, but there is some solace knowing that the
database can check the condition at the time of insertion too.

Thanks!

Reply via email to