MySQL Forums
Forum List  »  Microsoft SQL Server

GUID Unique Identifier Data Type
Posted by: Gerard Mey
Date: October 19, 2004 04:17AM

I want to transform MS SQL Server 2000 data to MySQL for website purposes and visa versa.

The RECID field is and "autoincrement" type to generated by the database server.

The purpose of the RECKEY field is to be unique between the two databases so it does not matter where the record was generated.

What is the solution to this problem ?


CREATE TABLE [GUID_1] (
[REDID] [int] IDENTITY (1, 1) NOT NULL ,
[RECKEY] [uniqueidentifier] NOT NULL CONSTRAINT [DF_GUID_1_RECKEY] DEFAULT (newid()),
[RECNEW] [smalldatetime] NOT NULL CONSTRAINT [DF_GUID_1_RECNEW] DEFAULT (getdate()),
[RECDEL] [char] (1) COLLATE Latin1_General_CI_AS NOT NULL CONSTRAINT [DF_GUID_1_RECDEL] DEFAULT (0),
[NAME] [varchar] (48) COLLATE Latin1_General_CI_AS NULL ,
CONSTRAINT [PK_GUID_1] PRIMARY KEY CLUSTERED
(
[REDID]
) ON [PRIMARY]
) ON [PRIMARY]
GO

Options: ReplyQuote


Subject
Written By
Posted
GUID Unique Identifier Data Type
October 19, 2004 04:17AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.