I created a simple table in MySql:
CREATE TABLE USER (
USER_ID INT NOT NULL AUTO_INCREMENT,
USER_LOGIN_NAME VARCHAR(100) NOT NULL,
USER_NAME VARCHAR(100) NOT NULL,
USER_EMAIL VARCHAR(100) NOT NULL,
USER_PHONEVARCHAR(100)
PRIMARY KEY(USER_ID)
);
How can I enforce the NOT NULL constraint on USER_NAME column so that no empty
string can be inserted? Use 'no default'? MySql inserted an empty string if there is no value provided for USER_NAME?
[ October 31, 2008: Message edited by: Todd Jain ]