SQL trouble and google isn't being helpful.
S. Dale Morrey
sdalemorrey at gmail.com
Sat Dec 14 16:16:48 MST 2013
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.
On Sat, Dec 14, 2013 at 1:57 PM, Joshua Marsh <joshua at themarshians.com>wrote:
> On Sat, Dec 14, 2013 at 2:47 PM, S. Dale Morrey <sdalemorrey at gmail.com
> > 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
> > 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.
More information about the PLUG