Subject | Re: [firebird-support] Null and LIKE Clause |
---|---|
Author | Martijn Tonies |
Post date | 2004-04-28T10:00:15Z |
> >When we use LIKE '%', adding OR COLUMN2 IS NULL will solve the problem.But
> >when we use LIKE 'A%', the rows with null columns will be displayed too.I
> >will put '%' or 'A%' in a bind variable.Do note, that the DEFAULT is ONLY applied when you
>
> Do this:
>
> 1. Alter column COLUMN2 to have default '';
leave the COLUMN2 column from the INSERT INTO
statement. If you want to make sure it has '' instead of NULL,
create a BEFORE INSERT and BEFORE UPDATE trigger.
> 2. UPDATE X SET COLUMN2='' WHERE COLUMN2 IS NULL;With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com