Constraint [message #374837] |
Thu, 05 July 2001 10:34 |
Cindy
Messages: 88 Registered: November 1999
|
Member |
|
|
Hi,
Does anyone know how to add a constraint to a table that DOES NOT allow % symbol character to be inserted into a particular field of a table? I have tried this:
ALTER TABLE tablename
ADD CONSTRAINT "constraint_name" CHECK (field_name NOT LIKE '%\%%' ESCAPE '\')
But it seems like this constraint did not kick in, because it still allow me to insert this % symbol into that field_name of the table. Does anyone have any idea why or have alternative solution to is issue?
Thanks!
-- Cindy
|
|
|
|