home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / programming / oracle7 7.2 / DB / UTIL72 / CAT711.SQL < prev    next >
Encoding:
Text File  |  1995-05-09  |  1.2 KB  |  37 lines

  1. rem 
  2. rem $Header: cat711.sql 7020100.1 94/09/23 22:14:28 cli Generic<base> $ 
  3. rem 
  4. Rem  Copyright (c) 1991 by Oracle Corporation 
  5. Rem    NAME
  6. Rem      m710711.sql - <one-line expansion of the name>
  7. Rem    DESCRIPTION
  8. Rem      <short description of component this file declares/defines>
  9. Rem    RETURNS
  10. Rem 
  11. Rem    NOTES
  12. Rem      <other useful comments, qualifications, etc.>
  13. Rem    MODIFIED   (MM/DD/YY)
  14. Rem     glumpkin   10/20/92 -  Renamed from M710711.SQL 
  15. Rem     epeeler    06/24/92 -  Creation 
  16.  
  17.  
  18. REM update the cdef$ table first to make the NULL$ constraints type 7
  19. update cdef$ set type=7 where
  20.   con# in (select abs(null$) from col$ where null$>0 or
  21.        null$ < 0);
  22.  
  23.  
  24. REM update the col$ for the enabled NOT NULL column constraints
  25. update col$ set null$=1 where null$ > 0;
  26.  
  27. REM update the col$ table for the disabled NOT NULL column constraints
  28. update col$ set null$=0 where null$ < 0;
  29.  
  30. REM update the col$ table for the enabled primary keys
  31. update col$ c set null$=null$+1 where
  32. (obj#,col#) = (select cc.obj#,cc.col# from ccol$ cc,cdef$ cd
  33.            where cc.con#=cd.con# and cd.type=2 and
  34.            enabled is not null and c.obj#=cc.obj# and
  35.            c.col#=cc.col#);
  36.  
  37.