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 [EMAIL PROTECTED]
> 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 <[EMAIL PROTECTED]>
> To unsubscribe, e-mail 
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Gerald L. Clark
[EMAIL PROTECTED]


---------------------------------------------------------------------
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

Reply via email to