在'IDENTITY'附近使用正确语法的MySQL服务器版本 [英] MySQL server version for the right syntax to use near 'IDENTITY'

查看:235
本文介绍了在'IDENTITY'附近使用正确语法的MySQL服务器版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您的SQL语法有错误;查看与您的MySQL服务器版本对应的手册,以便在IDENTITY附近使用正确的语法,



如果我不得不问这个问题似乎与这行有关



Newt_Id INTEGER NOT NULL UNIQUE IDENTITY,



其中MS SQL不支持UNIQUE IDENTITY短语服务器2008.



我的问题:为什么会出现这个问题以及如何解决? +这个SQL代码是由另一个程序自动生成的,所以可以简单地使用不同版本的SQL服务器吗?



You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTITY,

If i had to ques the problem seems to be with this line

Newt_Id INTEGER NOT NULL UNIQUE IDENTITY,

where "UNIQUE IDENTITY" phrase is not supported in MS SQL server 2008.

My question: Why is this problem occurring and how to fix it? + This SQL code is automatically generated by another program so would it be possible to simply use a different version of SQL server?

CREATE TABLE Person
(
  Newt_Id INTEGER NOT NULL UNIQUE IDENTITY,
  Newt_CreatedBy INTEGER NULL,
  Newt_CreatedDate DATETIME NULL,
  Newt_UpdatedBy INTEGER NULL,
  Newt_UpdatedDate DATETIME NULL,
  Newt_TimeStamp DATETIME NULL,
  Newt_Deleted INTEGER NULL,
  Newt_Secterr INTEGER NULL
)





欢迎提出任何意见或建议。谢谢。



Any comments or suggestion are welcome. Thank you.

推荐答案

它被称为AUTO_INCREMENT

http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html [ ^ ]
It's called AUTO_INCREMENT
http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html[^]


道歉,问题是由于外部程序的错误输入造成的。
Apologies the problem was cased by the wrong input through the external program.


这篇关于在'IDENTITY'附近使用正确语法的MySQL服务器版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆