Petre, Tuesday, November 05, 2002, 9:26:08 PM, you wrote: PA> just out of interest, PA> How can I create unique "data sets", or rather, set a set of data as PA> unique, to prevent another entry in the table that meets the same PA> criteria,
PA> for instance: PA> id name surname address PA> 1 john doe 1 street PA> 2 mary jane 2 lane PA> 3 john doe 3 ave PA> 4 john doe 1 street PA> As you can see row one and row 4 is identical in all 3 collumns, so how PA> would I prevent a write like this to the table? You can create UNIQUE key on these three fiels: http://www.mysql.com/doc/en/CREATE_INDEX.html http://www.mysql.com/doc/en/CREATE_TABLE.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php