home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / database / sybase / 501 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.1 KB  |  33 lines

  1. Newsgroups: comp.databases.sybase
  2. Path: sparky!uunet!psinntp!kripalu!harit
  3. From: harit@kripalu.com
  4. Subject: Re: NULL to NOT NULL
  5. Message-ID: <1992Dec16.173448.281@uunet!cbmvax!xmws!kripalu>
  6. Sender: harit@uunet!cbmvax!xmws!kripalu
  7. Reply-To: harit@kripalu.com
  8. Organization: Kripalu Center
  9. References: <BzB27G.7Ex@well.sf.ca.us>
  10. Distribution: usa
  11. Date: Wed, 16 Dec 92 17:34:48 GMT
  12. Lines: 19
  13.  
  14. In article <BzB27G.7Ex@well.sf.ca.us> mharper@well.sf.ca.us (Michael J. Harper)  
  15. writes:
  16. > If I create a column in a table which allows NULLs, is there a way to go back
  17. > later and change this column to be NOT NULL?
  18. > -- 
  19. > Michael J. Harper
  20. > mharper@well.sf.ca.us
  21.  
  22. Only if you create a new table with the field declared NOT NULL and copy the  
  23. data, delete the original, and rename the copy back to the name of the  
  24. original.  The problem of changing it in the original table is that SYBASE does  
  25. not want to have to go check that each row has data for that field.  In general  
  26. SYBASE is not condusive to schema changes once you put data into the table.   
  27. They prefer copies.
  28. -- 
  29. Michael Allen Latta
  30. Kripalu Center
  31. harit@kripalu.com
  32. (413)448-3288
  33.