Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Constraints to prevent database to crash

Status
Not open for further replies.

andyoye

IS-IT--Management
Mar 23, 2004
56
US
I have a column (varchar 25)

The values it should store should look like

1111-111111 like 2006-123456

Is there a way I can make sure users cant enter mismatched data?

thanks

 
I am not sure but look for this stored procedure
sp_bindrule.

HTH
 
Look into constraints.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
how about this check constraint

SSN like '___-___-___'

Looks like its working for me

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top