Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 12th, 2010, 08:16 AM
Registered User
 
Join Date: Oct 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Triggers as a constraint but accepts nulls

I need a trigger that acts like a unique constraint on a column but i want that column to accept null values. For example: I have a table for storing purchasing data. I have a column that accepts nulls but if data is inserted in this column i want it to be unique. The only way i can think of accomplishing this is through a trigger but I cant seem to formulate the right code. If there is anyone who can help me, I would be very grateful.





Similar Threads
Thread Thread Starter Forum Replies Last Post
IN and NULLs joxa83 SQL Server 2005 8 September 29th, 2008 03:03 AM
css validator that accepts Classic ASP within in crmpicco CSS Cascading Style Sheets 1 March 16th, 2006 07:29 AM
looking for nulls Warbird C# 4 July 1st, 2004 07:50 AM
How can I make an bind control that accepts update Franklin66 Beginning VB 6 1 December 10th, 2003 09:04 AM
duplicate nulls in a column with unique constraint defiant SQL Server 2000 3 October 22nd, 2003 01:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.