[pgsql-jp: 36895] Re: 項目毎に件数指定をしたい

K.Nakatsuka tanpoko @ wk9.so-net.ne.jp
2006年 3月 18日 (土) 01:23:37 JST


中司と申します。

On Sat, 18 Mar 2006 00:54:57 +0900
nomoto <shin-1 @ ca2.so-net.ne.jp> wrote:

>   nomotoです。
> 
> >テーブルをt1で作成して試したのですが、
> >select * from TABLE1 where f1 in ( select f1 from TABLE1 t1 where t1.id=TABLE1.id order by f1 offset 0 limit 2);
> >ERROR:  relation "table1" does not exist
> >とエラーとなり、出来ませんでした。(7.4.12/8.1.3)どちらも同じ結果でした。
> >私は、どこか勘違いしていますか?
> 
> select xxx from TABLE1 t1
> てのは from TABLE1 as t1 の略で、実際はTABLE1だけど別名のt1
> で処理するって意味です。なのでTABLE1で作ればOK。
有難うございます。実は解らなくて調べている最中でした。
TABLE1 as t1 だったのですね。 了解です。


<*>---<*>------<*>------<*>------<*>---<*>
<*>      tanpoko @ wk9.so-net.ne.jp      <*>
<*>---<*>------<*>------<*>------<*>---<*>





pgsql-jp メーリングリストの案内