transactionID will remain unique for each record since it is set to auto_increment

the question is,  is  the table  supposed to hold more than one entry for a singe register?
if that is the case then the table is not normalized and a seperate table for registers might be required.


On Tue, Oct 27, 2009 at 11:43 AM, kennedy kariuki <kkairu@gmail.com> wrote:

On Tue, Oct 27, 2009 at 11:38 AM, Chris Mwirigi <mwirigic@gmail.com> wrote:
alter table table_name add unique (TransactionNo, Register);

it will create a compound key that gurantees that only one combination of transactionNo and Register is allowed


Chris,

how does he take care of the primary key alias???? I presume that would be the Transaction ID which has to be unique for the composite key???

_______________________________________________
Skunkworks mailing list
Skunkworks@lists.my.co.ke
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke
Other lists
-------------
Announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce
Science:  http://lists.my.co.ke/cgi-bin/mailman/listinfo/science
kazi:     http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general