|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 1:28 PM
Points: 6,
Visits: 396
|
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 6:30 AM
Points: 801,
Visits: 537
|
|
| 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: Today @ 2:02 PM
Points: 1,162,
Visits: 3,333
|
|
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
|
|
|
|