Yes, actually I think that's what I was exactly what I am looking for. I just need to ensure that Address+Transaction is always unique but either by themselves does not need to be. Thanks!
On Sat, Dec 14, 2013 at 1:57 PM, Joshua Marsh <[email protected]>wrote: > On Sat, Dec 14, 2013 at 2:47 PM, S. Dale Morrey <[email protected] > >wrote: > > > I have a table that looks like this... > > > > Index (self incrementing number), Address (string), Transaction (string), > > Amount (probably long) > > > > What I need to do is enforce a rule that a given combination of address > and > > transaction must be unique without making either Address or Transaction, > > individually unique. > > > > I may not be understanding what you are asking, but I think most SQL > database have UNIQUE indexes. For example, in MySQL: > > CREATE UNIQUE INDEX AddressTransaction ON Table (Address, Transaction); > > /* > PLUG: http://plug.org, #utah on irc.freenode.net > Unsubscribe: http://plug.org/mailman/options/plug > Don't fear the penguin. > */ > /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
