home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!ucbvax!mtxinu!sybase!robert
- From: robert@sybase.com (Robert Garvey)
- Newsgroups: comp.databases.sybase
- Subject: Re: NULL to NOT NULL
- Keywords: nulls, rules, triggers
- Message-ID: <27422@sybase.sybase.com>
- Date: 22 Dec 92 17:29:34 GMT
- References: <BzB27G.7Ex@well.sf.ca.us> <ESH.92Dec15103611@prague.tss.com>
- Sender: news@Sybase.COM
- Distribution: usa
- Organization: Emeryville Tupleware, Party Planning Division
- Lines: 23
-
- In article <ESH.92Dec15103611@prague.tss.com>, esh@prague.tss.com (Edward S. Hirgelt) writes:
- |>
- |> 1. Create a rule for the particular column that forbids nulls.
-
- Null values are not checked against a rule of the column allows
- nulls, so this won't work as expected.
-
- |> 2. Modify the insert and update triggers (or create them) to check for
- |> nulls in this column. If it finds any it can roll back the
- |> transaction.
-
- This will work.
-
- Warren Finnerty's recommendation to put the data into another table with
- a different schema, one that has that column disallowing nulls, may be a
- better way to go, provided you don't have any rows with null in them.
- It would also be prudent to heed Warren's caution about dependencies.
-
- --
- Robert Garvey robert@sybase.com {sun,lll-tis,pyramid,pacbell}!sybase!robert
- Sybase, Inc 6475 Christie Ave Emeryville, CA 94608-1010
-
- Opinions here may be attributed to the poster and are not related to Sybase.
-