Re: [SQL] UPDATE/INSERT on multiple co-dependent tables

2004-11-14 Thread Karsten Hilbert
> Is it possible for an UPDATE/INSERT query string to function in such a
> way that it requires two like fields in different tables to be equal
> to/'in sync with' one another: 
> 
> Example: I have two tables: registration & schedules 
> they both record a class_id, start_date,  end_date... I want to make
> sure that if the schedule_id field is updated in the registration table;
> that class_id, start_date & end_date fields automatically change to
> match the schedules.id record in the schedules table
Sounds like you want a foreign key with ON UPDATE CASCADE. If
that doesn't work for some reason or other you might be able
to achieve what you need with an explicit trigger on update of
registration.schedule_id.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [SQL] postgreSQL 8beta

2004-11-14 Thread Theodore Petrosky
Are you asking for a column of type  'unknown'? I
don't understand what this column would be able to do.

Ted

--- beyaNet <[EMAIL PROTECTED]> wrote:

> Hi,
> does postgresql have a datatype 'other' which in
> hsqldb is an Object? I 
> am trying to convert the table below into postgreSQL
> 8:
> 
> 
>   create table TIMERS (
>   TIMERID varchar(50) not null,
>   TARGETID varchar(50) not null,
>   INITIALDATE timestamp not null,
>   INTERVAL bigint,
>   INSTANCEPK other,
>   INFO other,
>   constraint timers_pk primary key (TIMERID)
> 
> 
> regards
> 
> 
> Andrew
> 
> 



__ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly