Tim Russell wrote:
Hi all,
When I run the following code the default value isn't being calculated using the concat
and other functions. Instead it is setting the column definition as a string: CONCAT("TMP
How can I rework this to get a result more like TMP-T-00002
?
You can't. Default values can only be constants. ( except for autoincrement and timestamp )
USE cro;
CREATE TABLE lpamform ( crofileno VARCHAR(11) NOT NULL DEFAULT 'CONCAT("TMP-T-",ROUND(RAND(NOW())*100000))', docstatus ENUM('C','A') NOT NULL DEFAULT 'C', PRIMARY KEY (crofileno) ) TYPE=MyISAM;
Thanks,
Tim
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
