List:General Discussion« Previous MessageNext Message »
From:SGreen Date:March 18 2005 1:48pm
Subject:Re: Ms Sql unique identifier field
View as plain text  
There is the UUID() function (added in 4.1.2). 
http://dev.mysql.com/doc/mysql/en/miscellaneous-functions.html

However you cannot make a field's DEFAULT value a function (yet) so you 
will need to use UUID() in your INSERT and UPDATE statements where 
appropriate.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

"Chris Knipe" <savage@stripped> wrote on 03/18/2005 06:19:46 AM:

> AUTO_INCREMENT is not the same as newid().
> 
> Frankly, something like newid() would be very useful in MySQL.
> 
> --
> Chris.
> 
> 
> ----- Original Message ----- 
> From: "Gleb Paharenko" <gleb.paharenko@stripped>
> To: <mysql@stripped>
> Sent: Thursday, March 17, 2005 5:53 PM
> Subject: Re: Ms Sql unique identifier field
> 
> 
> > Hello.
> >
> >
> >
> >
> >
> > You should think about AUTO_INCREMENT. See:
> >
> >  http://dev.mysql.com/doc/mysql/en/example-auto-increment.html
> >
> >
> >
> >
> >
> > [snip]
> >
> >
> >
> >
> >
> >
> >
> > Hi!
> >
> > i have a question:
> >
> > FIELD IN MS SQL SERVER
> >
> > FiledName: uiAutID
> >
> > DataType: unique identifier
> >
> > DefaultValue: newid()
> >
> >  how i can describe the some column in MySQL?
> >
> >  if isn't possible, how can i solve my problem?
> >
> >   P.S.: is necessary for us, use "unique identifier" data type because
> >
> >
> >
> >   the datas must be exchanged with others companies and we need 
garantee
> >
> >
> >
> >   unique identification of all the informations.
> >
> >
> >
> >    Maurizio, Sponda
> >
> >
> >
> > [snip]
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > -- 
> > For technical support contracts, goto 
https://order.mysql.com/?ref=ensita
> > This email is sponsored by Ensita.NET http://www.ensita.net/
> >   __  ___     ___ ____  __
> >  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
> > / /|_/ / // /\ \/ /_/ / /__   Gleb.Paharenko@stripped
> > /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
> >       <___/   www.mysql.com
> >
> >
> >
> >
> > -- 
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe: 
http://lists.mysql.com/mysql?unsub=1
> >
> > 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
> 

Thread
Ms Sql unique identifier fieldSponda Maurizio17 Mar
  • Re: Ms Sql unique identifier fieldGleb Paharenko18 Mar
  • Re: Ms Sql unique identifier fieldChris Knipe18 Mar
    • Re: Ms Sql unique identifier fieldSGreen18 Mar