Re: Setting a specific default value on a field

2001-03-13 Thread Vivek Khera
"JSB" == Jamie S Buchanan [EMAIL PROTECTED] writes: JSB More specifically, I have two DateTime fields (A and B), in my creation JSB script I want to set the default value of B to the value of A so that JSB when I write a new record to the table the position of B can be left what's wrong with

Setting a specific default value on a field

2001-03-09 Thread Jamie S Buchanan
Hello all, I'm a third year uni student in Scotland doing a year long project which involves a fair amount of MySQL. I have the following problem and would be appreciative if I could get some advice on solving it: - in the script I run to create a table how do I code one DateTime field to

Re: Setting a specific default value on a field

2001-03-09 Thread Peter Skipworth
Jamie, mySQL doesn't support triggers, and you'd need them (or a stored procedure). Surely you could just set both A and B explicitly in your application logic to the same value though ? Or am I missing your point ? P On Fri, 9 Mar 2001, Jamie S Buchanan wrote: Hello all, I'm a third year

Re: Setting a specific default value on a field

2001-03-09 Thread Gerald L. Clark
Defaults can only be constants. You might want to look at timestamp. The first timestamp field in a row gets updated every time teh record changes. All other timestamps in a row only get updated automatically on insert. Jamie S Buchanan wrote: Hello all, I'm a third year uni student in