I'm trying to create some tables with foreign keys.
When I try to create a foreign key ...
foreign key(seq_code) references sequences(seq_code) on update
CASCADE on delete CASCADE,
I get this message:
ERROR: UNIQUE constraint matching given keys for referenced table
"sequences" not f
Markus Wagner writes:
> I need to find the entries for "my" tables within pg_class, without the
> indexes ("..._pkey").
> How does one have to interpret "reltype" and that, and where are the
> docs/header files?
http://www.de.postgresql.org/users-lounge/docs/7.1/postgres/catalog-pg-class.html
-
SELECT * FROM Payments P1 WHERE Date = (SELECT MAX(Date) FROM Payments P2
WHERE P2.CustomerNo = P1.CustomerNo)
I think that will do it.
- James
- Original Message -
From: "Henry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]@postgresql.org>
Sent: Saturday, July 14, 2001 3:16 PM
Subject: [SQ
Use "<", ">" and "AND" after the "WHERE" to filter your return. This
works only if your testID is Serialized (ie 1,2,3). If they are
uniqueID's, another field must be used in it's place
---(end of broadcast)---
TIP 6: Have you searched our list
One way to do this is to use the 'CASE' expression, documented here:
http://pgsql.dbexperts.com.br/devel-corner/docs/postgres/functions-conditional.html
Because you have only one record per person, you can use the 'COUNT'
aggregate function to see how many of each height category match. An
examp
> But - this gives them in reverse timestamp order. So - wrap the query in
> a view and then apply your own ORDER BY.
>
> Can't remember who came up with this (some evil genius :-) - but it
> seemed to make sense so I stuck the example in my PostgreSQL notes.
We kept rejecting the idea of ORDER
Hi,
I need to find the entries for "my" tables within pg_class, without the
indexes ("..._pkey").
How does one have to interpret "reltype" and that, and where are the
docs/header files?
Thanks,
Markus
---(end of broadcast)---
TIP 1: subscribe and
hi all,
is it possible to comment a column of a table similar to
EXTRA of mySQL.
If yes then how??
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [
sorry! infact, i didn't try that with quote. now it is
fine.. sorry for ur inconvinence and thankx however.
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
hi,
how can we select * from a view named 'select'??
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Josh Berkus wrote:
>
> Pater, Robbie, Bruce,
>
> Makes sense. I take it that this is a deviation from the ANSI 92
> standard, then?
>
> What happens if I put an ORDER BY in a view, then call an ORDER BY in a
> query, e.g.:
> Does the second ORDER BY override or suppliment the view ORDER BY, o
11 matches
Mail list logo