Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
victorbello
Starting Member
1 Post |
Posted - 2007-01-31 : 13:35:59
|
Hello: I'm having a problem with my database. I have a users table where the username and password fields are set to Not Allow Null values, but, when somebody signs up to the site they can put a blank value ' ' and register. That is not Null, how can I set up the server so that it can not accept blank values like that?ThanksVB DOTNET |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-01-31 : 13:41:20
|
You should have a unique constraint put on the column. You should also have a check constraint on it. The unique constraint would prevent duplicates and the check constraint would check for the '' entry and not allow it. BTW, this thread should not be in the Data Corruption forum.Tara Kizer |
|
|
|
|
|