List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:September 24 2001 8:06pm
Subject:Re: Functions as default values
View as plain text  
You can't.
Default values must be constants.

Håkan Elmqvist wrote:

> Timestamp is a useful datatype when you want to register when a record 
> changed. Now I want to register who changed it and tried to use user() 
> as a default value and my database just returned user() as the field 
> value. Is there someone who can tell me how to use a function result as 
> default value? The manual is not very clear on this issue.
> H
> 
> 
> Professor Håkan Elmqvist
> Avdelningen för medicinsk teknik
> Institutionen för medicinsk laboratorievetenskap & teknik
> KAROLINSKA INSTITUTET
> Novum
> 141 57 Huddinge
> Tel 46-8-585 837 55, Fax 46-8-779 55 50
> epost hakelm@stripped
> Organisationsno. 01 202100-2973 01
> Vat No. SE 202100297301
> 
> ---------------------------------------------------------------------
> 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 <mysql-thread86144@stripped>
> To unsubscribe, e-mail 
> <mysql-unsubscribe-gerald_clark=suppliersystems.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Gerald L. Clark
gerald_clark@stripped

Thread
Functions as default valuesHÃ¥kan Elmqvist22 Sep
  • Re: Functions as default valuesGerald Clark24 Sep
  • Re: Functions as default valuesRodney Broom24 Sep