Re: [SQL] primary + foreign key

2002-12-12 Thread Huub
Thanks for pointing out. I'm not that experienced in SQL yet; so detail could as well be some extra instruction and I've never seen 'references master' before. But I think I'll manage now. Thanks Tomasz Myrta wrote: Huub wrote: Hi, I suppose 'detail' is

Re: [SQL] primary + foreign key

2002-12-12 Thread Huub
Hi, I suppose 'detail' is the table name? And what is master? Thanks Huub create table detail ( id1 integer, id2 integer, CONSTRAINT c1 PRIMARY KEY(id1,id2), CONSTRAINT c2 FOREIGN KEY(id1,id2) REFERENCES master ); Do you really need such detail table? You can just add

[SQL] primary + foreign key

2002-12-12 Thread Huub
Hi, I want to create a table where the 2 columns are both primary as well as foreign key. What is the correct syntax for that? Thanks Huub ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe

[SQL] Error message: standard SQL or PostgreQSL?

2002-11-14 Thread Huub
Hi, When I copied a function call into an SQL-statement and executed it, I got the message 'Aggregate function calls may not be nested'. Does that mean this is the case in standard SQL or is this specifically PostgreSQL? Thanks Huub ---(end of

[SQL] changing numeric into int

2002-11-07 Thread Huub
Hi, I want to change 2 columns in the same table from numeric into int. Can I do this without deleting the old table and creating a new one? Data stays the same.. Thanks Huub ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ

Re: [SQL] primary keys

2002-11-07 Thread Huub
being the member of the primary key. Terry Fielder Network Engineer Great Gulf Homes / Ashton Woods Homes [EMAIL PROTECTED] >-Original Message- >From: [EMAIL PROTECTED] >[mailto:pgsql-sql-owner@;postgresql.org]On Behalf Of Huub >Sent: Wednesday, November 06, 2002 9:19 AM

[SQL] primary keys

2002-11-07 Thread Huub
Hi, I want to create a table which has 2 columns, and both columns have to be primary key (or: together they are the primary key). How can I do this using SQL? Using pgAdminII for Postgres7.2.2 on RH8. Thanks Huub ---(end of broadcast)--- TIP