Difference between revisions of "SYNCNUM()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision: SQL) |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Function to return the unique sequence number assigned to a row from the specified table | Function to return the unique sequence number assigned to a row from the specified table | ||
− | |||
==Syntax== | ==Syntax== | ||
SYNCNUM([<workarea | alias>]) | SYNCNUM([<workarea | alias>]) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[CURSYNCNUM()]], [[SQL INSERT|INSERT | + | [[CURSYNCNUM()]], [[SQL INSERT|INSERT]], [[RECNO()]], [[ROWNUM()]], [[SQL Pseudo Columns|PSEUDO COLUMNS]], [[SQL SELECT|SELECT]], [[SQL UPDATE|UPDATE]] |
− | + | ||
==Description== | ==Description== | ||
Line 18: | Line 12: | ||
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. | ||
− | |||
==Example== | ==Example== | ||
Line 26: | Line 19: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:SQL]] | [[Category:SQL]] |
Revision as of 12:55, 10 February 2012
Contents
Purpose
Function to return the unique sequence number assigned to a row from the specified table
Syntax
SYNCNUM([<workarea | alias>])
See Also
CURSYNCNUM(), INSERT, RECNO(), ROWNUM(), PSEUDO COLUMNS, SELECT, UPDATE
Description
The SYNCNUM() function returns the unique sequence number assigned to a row from the specified table. The SYNCNUM() 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.
Example
OPEN DATABASE southwind SELECT syncnum(), recno() FROM example