|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 9:08 AM
Points: 6,
Visits: 397
|
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 6:22 AM
Points: 805,
Visits: 538
|
|
| Sometimes I want to keep a "history" of the different settings, or have more than one set depending on circumstances. In these cases, I use a "current" column (bit) to determine which row I should be using. Just for info.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 9:21 AM
Points: 1,164,
Visits: 3,340
|
|
An alternate method to insure only one row (or 2, 3, ... rows) would be to simply define a unique key and check constraint on the table's ID column.
create table tempdb..foo ( foo_id int not null primary key check (foo_id = 1) );
"Wise people understand the 10,000 things without going to each one. They know them without having to look at each one, and they transform all without acting on each one." - The Tao Te Ching: Verse 47
|
|
|
|