haman...@t-online.de wrote:
>
> is there a way to use a table alias for the target table in an UPDATE query?
> I would like to avoid spelling out things like that in psql:
>
> update myverylongtablename set col1 = r.col1repl from repltable r
> where myverylongtablename.id = r.id and myverylongt
is there a way to use a table alias for the target table in an UPDATE query?
I would like to avoid spelling out things like that in psql:
update myverylongtablename set col1 = r.col1repl from repltable r
where myverylongtablename.id = r.id and myverylongtablename.col2 > 0
Regards
Wolfgang Ham
nevermind.. guess there was a problem with the query condition itself
regards
- Amol
On 05/04/10 22:42, Amol Chiplunkar wrote:
Hi,
I notice that for the following:
Table Base with say columns col1, col2
Table Child1 inherits(Base)
Table Child2 inherits(Base)
With check constraints and rule
Hi,
I notice that for the following:
Table Base with say columns col1, col2
Table Child1 inherits(Base)
Table Child2 inherits(Base)
With check constraints and rules to insert the rows to appropriate
tables defined.
Inserts work as expected.
select * from Base; returns rows from both the child
Stephan Szabo <[EMAIL PROTECTED]> writes:
> Well, technically by SQL92 I believe the second query should be an error
> since the table reference "bar b" should not be exporting the name "bar"
> unless I'm misreading the spec...
Correct. SQL sez that "FROM bar b" exposes the correlation name "b",
Thanks, that makes sense.
Although, I'd much rather have an error then the wrong data. :(
Cheers,
Darrin
>From: Stephan Szabo <[EMAIL PROTECTED]>
>To: Darrin Ladd <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: [GENERAL] Table Alias
>Date: Tue,