Hello!

James Foley wrote:

>Hi,
>
>If this is trivial, please bare with me:
>
>How do I alter a table in Sql to add a column
>which is the multiple of two existing
>columns:
>A Table has columns a,b,c and I want to
>add column d which will be b*c
>
>  
>

AFAIK there is no way to automaically set the value via DEFAULT, since 
DEFAULT has to be constant and since there are no triggers by now, try:

INSERT INTO table VALUES (a,b,a*b);

Greetings
 Ralf

-- 
Ralf Narozny
SPLENDID Internet GmbH & Co KG
Skandinaviendamm 212, 24109 Kiel, Germany
fon: +49 431 660 97 0, fax: +49 431 660 97 20
mailto:[EMAIL PROTECTED], http://www.splendid.de




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