|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
||||
|
||||
|
problem setting default value in ms sql 2k
This is driving me nuts. I have a column in my table that I want to contain blank space, not null. Failing that, I would settle for a small mark, like a '.' or ':'. I have been trying to set this as the default value in for the column, with the data type being char. When I input ' ' or '.' I get an error about not being able to insert a null column (since I don't allow nulls in that column). If I put a string into the column, I don't get an error, but the column is just empty. I obviously don't get something about this, any help would be appreciated. Thanks
__________________
--Dave-- U2kgSG9jIExlZ2VyZSBTY2lzLCBOaW1pdW0gRXJ1ZGl0aW9uaXMgSGFiZXM= |
|
#2
|
|||
|
|||
|
Can you set a default value?
column char(10) null DEFAULT ' ' |
|
#3
|
||||
|
||||
|
Where would I enter that? I've been trying to put in the default value using the design view in enterprise manager
|
|
#4
|
|||
|
|||
|
That statement will go in your table create statement. If the table is created you will need to issue an ALTER statement. There should be a column called default in the design view. I currently use MS SQL 7.0.
|
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > problem setting default value in ms sql 2k |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|