You are here: set default value for a char column?? « MsSQL Server « IT news, forums, messages
set default value for a char column??

Posted by tlyczko on 09/25/06 18:18

I have a char(11) for SSN, and I would like to default it to
123-45-6789 so I can avoid having nulls in this column, and so I can
easily find the rows in which I need to have a 'correct' SSN
entered/updated.

I tried using just 123-45-6789, and SQL2005 doesn't seem to be
defaulting to this value, it seems to be keeping it as
(((123)-(45))-(6789), and not placing it into this column when a new
row is created....

Is there some special way I must specify defaults for a char(11) field
(Yes, I will include the dashes).

Thank you,
Tom

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация