How would you prevent duplicate entries in a column in SQL.
am 23.02.2005 02:49:02 von Imran AzizHow would you prevent duplicate entries in a column in SQL ?
Imran
How would you prevent duplicate entries in a column in SQL ?
Imran
Put a UNIQUE index (not duplicates allowed) on it.
"imran aziz"
news:%23$%23ggnUGFHA.2676@TK2MSFTNGP12.phx.gbl...
> How would you prevent duplicate entries in a column in SQL ?
> Imran
>
Sounds like a good candidate for the primary key.
"imran aziz"
news:%23$%23ggnUGFHA.2676@TK2MSFTNGP12.phx.gbl...
> How would you prevent duplicate entries in a column in SQL ?
> Imran
>
>
If showing results and you don't want duplicates:
strSQL = "SELECT DISTINCT LName FROM MyTable ORDER BY LName"
Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!