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

nomoto shin-1 @ ca2.so-net.ne.jp
2006年 3月 18日 (土) 00:54:57 JST


  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。



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