Difference between revisions of "SQL Pseudo Columns"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) m (Pseudo Columns moved to SQL Pseudo Columns) |
Helengeorge (Talk | contribs) |
||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Provide extra information about a SELECT row set | Provide extra information about a SELECT row set | ||
Line 39: | Line 32: | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
− | [[Category:SQL]] | + | [[Category:SQL|Pseudo Columns]] |
[[Category:Pseudo Columns]] | [[Category:Pseudo Columns]] |
Latest revision as of 15:22, 29 October 2009
Purpose
Provide extra information about a SELECT row set
See Also
Description
A Pseudo Column behaves like a table column, but is not actually stored in the table. You can select from Pseudo Columns, but they cannot be updated. They provide extra information about a row set.
Pseudo Columns | Description |
---|---|
CURRVAL | The CURRVAL Pseudo Column will return the current sequence number from the specified table. Sequence numbers can be used for primary and unique index keys. |
NEXTVAL | The NEXTVAL Pseudo Column will return the next unique sequence number from the specified table. Sequence numbers can be used for primary and unique index keys. |
ROWID | The ROWID Pseudo Column will return a number identifying the row’s physical stored position in the table. The ROWID Pseudo Column can be used to perform singleton selects, or optimize updates of a known ROWID. |
ROWNUM | The ROWNUM Pseudo Column will return a number indicating the order in which the rows are selected from the table. |
SQLCNT | The SQLCNT Pseudo Column will return the number of rows affected by the last SQL statement. For example, after a SELECT statement, SQLCNT will contain the number of rows selected. |
SQLCODE | The SQLCODE Pseudo Column will return a number indicating the result of the last SQL statement. |
SYNCNUM | The SYNCNUM pseudo column will return the unique sequence number assigned to a row from the specified table. |