什么是Mysql中uniqueidentifier的替代品 [英] What is the replacement for uniqueidentifier in Mysql
本文介绍了什么是Mysql中uniqueidentifier的替代品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个要在Mysql中运行的SQL Server查询.但是我找不到从SQL Server脚本到MYSQL脚本的uniqueidentifier
关键字的任何替代内容.
I have a query from SQL Server which I want to run in Mysql. but I cannot find any replacement for uniqueidentifier
keyword from SQL Server script to MYSQL Script.
这是查询
CREATE TABLE foo(
myid uniqueidentifier NOT NULL,
barid uniqueidentifier NOT NULL
)
对于上面相同的SQL Server脚本,Mysql中的查询是什么?
What will be the query in Mysql for the same above SQL Server script?
推荐答案
CREATE TABLE FOO (
myid CHAR(38) NOT NULL,
barid CHAR(38) NOT NULL
);
根据MS网站,GUID的长度为38个字符.
According to MS website, GUID's are 38 chars in length.
这篇关于什么是Mysql中uniqueidentifier的替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文