Home » SQL & PL/SQL » SQL & PL/SQL » sys_guid
sys_guid [message #20438] Thu, 23 May 2002 11:19 Go to next message
mark judd
Messages: 2
Registered: May 2002
Junior Member
i am attempting to use sys_guid in key fields instead of using sequences because of the limitation of sequences for replication.

i am planning on defining the key column as char(32).

does anyone have comments on using sys_guid for this and if i am using it correctly or am i asking for trouble because of the 16 byte to 32 byte conversion and the raw data thing?
Re: sys_guid [message #20440 is a reply to message #20438] Thu, 23 May 2002 12:00 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
I've always found it fairly straightforward to just start the sequences at a different number for each site:

Site 1: start with 1, increment by (n)
Site 2: start with 2, increment by (n)

where (n) is a number safely higher than the total number of master sites you will ever have.

But, if you want to use sys_guid(), a primary key column datatype of char(32) or varchar2(32) will work.

Just have fun typing in those values on ad-hoc queries!
Previous Topic: inserting data into single table from multiple tables
Next Topic: SQL Query: User last update record
Goto Forum:
  


Current Time: Thu Apr 25 09:20:22 CDT 2024