RE: Record number field question. . .
Posted in 1999
Topics: SQL Development & Query Writing
As I know, there is a rowid for every table. you can extract this value in
select statement like
select rowid, [field1, field2 ...] from table
thanks
Ravi Yarlagadda
Informix Certified Professional
-----Original Message-----
From: mojo_risin@my-deja.com [mailto:mojo_risin@my-deja.com]
Sent: Friday, December 10, 1999 12:23 PM
To: informix-list@iiug.org
Subject: Record number field question. . .
Can anyone tell me how to extract the record number from any table?
I believe there is a hidden field in each table called 'recno' or
'recordno' or something like that.
Anyone? Thanks.
MoJo Risin
--
Sent via Deja.com http://www.deja.com/
Before you buy.
Yarlagadda, Ravi wrote:
> As I know, there is a rowid for every table. you can extract this value in
> select statement like
>
> select rowid, [field1, field2 ...] from table>
> thanks
> Ravi Yarlagadda
> Informix Certified Professional
>
> -----Original Message-----
> From: mojo_risin@my-deja.com [mailto:mojo_risin@my-deja.com]
> Sent: Friday, December 10, 1999 12:23 PM
> To: informix-list@iiug.org
> Subject: Record number field question. . .
>
> Can anyone tell me how to extract the record number from any table?
>
> I believe there is a hidden field in each table called 'recno' or
> 'recordno' or something like that.
>
> Anyone? Thanks.
>
> MoJo Risin
> --
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Ravi,
The (hidden) rowid column is always defined
for non-fragmented tables and only defined for
fragmented tables when explicitly requested at
table creation time (IIRC - See the CREATE TABLE
section of the SQL Syntax Guide).
Also, the rowid is not the number of the row, but a
value derived from the physical address of the row.
I've found that you can't rely on "rowid" to give you
the row number.
Cheers,
Avi.
--
/\\ \\ /| Avi Abrami, Analyst/Programmer, Telegate Ltd.
/__\\ \\ / | 7 Haplada Street, Or-Yehuda, ISRAEL
/ \\ \\/ | Phone:+972-3-5388717 Fax:+972-3-5335877 eMail:avia@telegate.co.il