hi list,
sorry for posting again, i will learn it.
i have a problem with DEFAULT NULL value in a varchar field.
mysql is version 3.23.33.
i want to have an user field in a row, to see who has created the row.
create table minidb.tel (
id int UNSIGNED NOT NULL AUTO_INCREMENT,
tel char(16) NOT NULL,
service char(1) BINARY,
idate timestamp(14) NOT NULL,
iuser varchar(255) NOT NULL,
primary key (id, tel, idate)
);
using DEFAULT USER(), would be nice, but only constants are allowed.
to prevent inserting rows without iuser, i like to have this field
with NOT NULL restriction and default value NULL.
when inserting a row with
insert into tel set tel='+49 174 92932000', service=1;
there will be a record with iuser = ''.
i thought the meaning of NOT NULL is to reject inserting rows with
iuser as NULL.
the line
iuser varchar(255) NOT NULL DEFAULT NULL,
will rejected with an errormsg.
thx in advance for your help
stefan
--
st3V13h
nach diktat verreist
---------------------------------------------------------------------
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