I have a database that needs to have unique values wherein it will provide an error saying "Username already exist" and will not add to database. How to do this?
You can select the user name from the database to see if it is already used: SELECT COUNT(*) FROM user_table WHERE userid = 'WhateverTheUserTypedIn' If this returns anything other than zero, that userid is already in use. In some databases you could make the userid field an identity field, which … Read More
Edited by AngelicOne: n/a
Edited by Lusiphur: n/a