2018-06-12 12:38 GMT+02:00 Clemens Ladisch :
> Cecil Westerhof wrote:
> > I want to create a field that only has values that consist of letters,
> > numbers end '-'. So no spaces, quotes or special characters like: '@%$!'.
> > What is the best way to write this check constraint?
>
> The GLOB opera
my guess
check( your_col NOT GLOB '[@%$!]" ' )
On Tue, Jun 12, 2018 at 7:50 PM, Cecil Westerhof wrote:
> I want to create a field that only has values that consist of letters,
> numbers end '-'. So no spaces, quotes or special characters like: '@%$!'.
> What is the best way to write this check
Cecil Westerhof wrote:
> I want to create a field that only has values that consist of letters,
> numbers end '-'. So no spaces, quotes or special characters like: '@%$!'.
> What is the best way to write this check constraint?
The GLOB operator has inverted character classes. So the field is vali
I want to create a field that only has values that consist of letters,
numbers end '-'. So no spaces, quotes or special characters like: '@%$!'.
What is the best way to write this check constraint?
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite
d b wrote:
> I would like to add check constraint for existing database. Is it
> possible?
SQLite has no built-in function (such as ALTER TABLE) to do this.
However, if you want to do a change that does not affect how the table's
data is stored in the database file, then you can change the tabl
Hi,
I would like to add check constraint for existing database. Is it
possible?
for ex:
create table emp(id integer primary key autoincrement,
fullname,fathername,mothername as text);
insert into emp(fullname,fathername,mothername) values("a","b","c");
insert into emp(fullname,fathernam
Is it possible to have a custom check constraint error message?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
On Mon, Mar 01, 2010 at 02:06:05PM -0600, Jay A. Kreibich scratched on the wall:
> Also, it is highly unlikely the expression "parent == NULL" does what
> you want, given that it will *always* return NULL. Try "parent IS
> NOT NULL".
Er... I mean "parent IS NULL".
-j
--
Jay A. Kre
On Mon, Mar 01, 2010 at 06:47:41PM +0300, ?? ??
scratched on the wall:
> Hello!
>
> I need to check if parent of group is exist or not.
> Parent stored in "parent" column and may be NULL or will be existing
> "idgroup" column value.
> It does not works because subqueries
Did you consider using foreign keys (assuming you have the latest
version of SQLite)?
Pavel
On Mon, Mar 1, 2010 at 10:47 AM, Артемий Васюков wrote:
> Hello!
>
> I need to check if parent of group is exist or not.
> Parent stored in "parent" column and may be NULL or will be existing
> "idgroup"
Hello!
I need to check if parent of group is exist or not.
Parent stored in "parent" column and may be NULL or will be existing
"idgroup" column value.
It does not works because subqueries prohibited in CHECK constraints.
My table showed below (incorrect constraint commented).
--
11 matches
Mail list logo