Many good suggestions concerning unique.
Another technique is available for checking whether a given value appears in a column, without any needing to fetch any data from your backend, and that is:
select 1 from mytable where mycol='foo'
You'll either get a row back, or nothing. In the general case, this is about as cheap as it gets.
--In reply to Re: Checking for Dupes in MySQL
by grinder
in thread Checking for Dupes in MySQL
by bagelesque
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |