Re: [SQL] PERSISTANT PREPARE (another point of view)

2008-07-22 Thread Jeff Williams
On 20/07/08 22:16, Milan Oparnica wrote: > Try to write following simple scenario: > > a. Data is retrieved from two tables in INNER JOIN > b. I don't need all fields, but just some of them from both tables > > Lets call tables Customers and Orders. > > Definition of tables are: > Customers (Custom

Re: [SQL] Update timestamp on update

2005-10-12 Thread Jeff Williams
Tom Lane wrote: >Jeff Williams <[EMAIL PROTECTED]> writes: > > >>last_status_change timestamp DEFAULT now() >> >> > > > >>What I would like is that whenever the status is changed the >>last_status_change timestamp is updated to

[SQL] Update timestamp on update

2005-10-12 Thread Jeff Williams
I have a table like: CREATE TABLE products ( id int, status int, last_status_change timestamp DEFAULT now() ); What I would like is that whenever the status is changed the last_status_change timestamp is updated to the current time. I have had a look at the rules and what I want would