How to UNIQUE Two fields together in mysql?
table is MyISAM
i want unique 2 field together
for ex:
CREATE TABLE IF NOT EXISTS `tblmytt` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `user` varchar(25) NOT NULL, `res` char(20) NOT NULL, `ref` char(20) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM;i want `user` and `res` unique
#Rec1
user: a res: bsuccess
-------------------------------------
#Rec2
user: a res: berror
-------------------------------------
#Rec3
user: a res: csuccess
-------------------------------------
#Rec4
user: c res: bsuccess
-------------------------------------
#Rec5
user: a res: cerror
-------------------------------------
thank you


Sign In
Create Account


Back to top









