Difference between revisions of "CURSYNCNUM()"
Yvonne.milne (Talk | contribs) m (1 revision: SQL) |
Yvonne.milne (Talk | contribs) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to return the current (last assigned) unique sequence number assigned to a row in the specified table | Function to return the current (last assigned) unique sequence number assigned to a row in the specified table | ||
− | |||
==Syntax== | ==Syntax== | ||
CURSYNCNUM([<workarea | alias>]) | CURSYNCNUM([<workarea | alias>]) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[SQL INSERT|INSERT]], [[ | + | [[SQL INSERT|INSERT]], [[PSEUDO COLUMNS]], [[RECNO()]], [[ROWNUM()]], [[SQL SELECT|SELECT]], [[SYNCNUM()]], [[SQL UPDATE|UPDATE]] |
− | + | ||
==Description== | ==Description== | ||
− | The CURSYNCNUM() function returns the current (last assigned) unique sequence number assigned to a row in the specified table. The CURSYNCNUM() function operates on the current workarea unless a numeric <workarea> or character <alias> is specified. | + | The CURSYNCNUM() function returns the current (last assigned) unique sequence number ([[SYNCNUM()]]) assigned to a row in the specified table. The CURSYNCNUM() function operates on the current workarea unless a numeric <workarea> or character <alias> is specified. |
Each new row inserted into a table will be assigned a unique sequence number for that table. Even if the row is deleted later or if all the rows are deleted from the table, that number will not be issued again. | Each new row inserted into a table will be assigned a unique sequence number for that table. Even if the row is deleted later or if all the rows are deleted from the table, that number will not be issued again. | ||
+ | CURSYNCNUM() and SYNCNUM() both return the 8 digit hexadecimal sequence number as a character string. | ||
==Example== | ==Example== | ||
Line 23: | Line 21: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:SQL]] | [[Category:SQL]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | [[Category: | + | [[Category:Cursor Functions]] |
− | + |
Latest revision as of 11:44, 15 February 2013
Contents
Purpose
Function to return the current (last assigned) unique sequence number assigned to a row in the specified table
Syntax
CURSYNCNUM([<workarea | alias>])
See Also
INSERT, PSEUDO COLUMNS, RECNO(), ROWNUM(), SELECT, SYNCNUM(), UPDATE
Description
The CURSYNCNUM() function returns the current (last assigned) unique sequence number (SYNCNUM()) assigned to a row in the specified table. The CURSYNCNUM() function operates on the current workarea unless a numeric <workarea> or character <alias> is specified.
Each new row inserted into a table will be assigned a unique sequence number for that table. Even if the row is deleted later or if all the rows are deleted from the table, that number will not be issued again.
CURSYNCNUM() and SYNCNUM() both return the 8 digit hexadecimal sequence number as a character string.
Example
OPEN DATABASE southwind SELECT distinct cursyncnum() FROM example