Re: default
Posted in 1997
Thuc Nguyen wrote:
>
> alter table nonmon_bond_detl add
> undetermined_value CHAR(1)
> # how to restrict to "Y" or "N" on undetermined_value? I tried default> "Y" or "N".
> note VARCHAR(255)
Something like this:
ALTER TABLE nonmon_bond_detl
ADD CONSTRAINT CHECK (undetermined_value IN ("Y", "N"))
CONSTRAINT constraint_name
Hope that helps,
--
Mark.
+----------------------------------------------------------+-----------+
|Mark D. Stock - Informix SA http://www.informix.com |//////// /|
|mailto:mdstock@informix.com FAQ http://www.iiug.org |///// / //|
| +-----------------------------------+//// / ///|
| Tel: +27 11 807 0313 |If it's slow, the users complain. |/// / ////|
| Fax: +27 11 807 2594 |If it's fast, the users keep quiet.|// / /////|
|Cell: +27 83 250 2325 |Therefore, "No news: travels fast"!|/ ////////|
+----------------------+-----------------------------------+-----------+