Difference between revisions of "SYNCNUM()"

From Lianjapedia
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 6: Line 6:
  
 
==See Also==
 
==See Also==
[[CURSYNCNUM()]], [[SQL INSERT|INSERT]], [[RECNO()]], [[ROWNUM()]], [[SQL Pseudo Columns|PSEUDO COLUMNS]], [[SQL SELECT|SELECT]], [[SQL UPDATE|UPDATE]]
+
[[CURSYNCNUM()]], [[SQL INSERT|INSERT]], [[GUID()]], [[RECNO()]], [[ROWNUM()]], [[PSEUDO COLUMNS]], [[SQL SELECT|SELECT]], [[SQL UPDATE|UPDATE]]
  
 
==Description==
 
==Description==
Line 12: 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.
 +
 +
CURSYNCNUM() and SYNCNUM() both return the 8 digit hexadecimal sequence number as a character string.
  
 
==Example==
 
==Example==
Line 22: Line 24:
 
[[Category:SQL]]
 
[[Category:SQL]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Table Basics]]
+
[[Category:Cursor Functions]]
[[Category:Table Basics Functions]]
+

Latest revision as of 06:00, 18 February 2013

Purpose

Function to return the unique sequence number assigned to a row from the specified table

Syntax

SYNCNUM([<workarea | alias>])

See Also

CURSYNCNUM(), INSERT, GUID(), 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.

CURSYNCNUM() and SYNCNUM() both return the 8 digit hexadecimal sequence number as a character string.

Example

OPEN DATABASE southwind
SELECT syncnum(), recno() FROM example