2 stormzeng stormZeng 于 2016.04.14 15:32 提问

下面sql建表语句哪里错了? 有错误提示

create table salary(
salaryId int identity(1,1),
employeeId char(100),
employeeName char(100),
year char(100),
month char(100),
basicWage float,
overtimeWage float,
trafficWage float,
totalWage float,
kaoqinReduce float,
secureReduce float,
taxReduce float,
totalReduce float,
realWage float,
editTime char(100),
memo char(100)
)
然后给出的错误提示:(我实在 Navicat上运行的)
[Err] 1064 - 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(1,1),
employeeId char(100),
employeeName char(100),
year char(100' at line 2

year char(100' at line 2

4个回答

Favorite_988
Favorite_988   2016.04.14 15:45
已采纳

亲 mysql 没有identity,,,,,,那是sqlserver的,mysql的是:AUTO_INCREMENT

jiahengzhang
jiahengzhang   2016.04.14 15:38

mysql 没有 identity

CSDNXIAON
CSDNXIAON   2016.04.14 15:42

SQL建表语句
SQL 快速建表语句
Excel自动生成sql建表语句
----------------------同志你好,我是CSDN问答机器人小N,奉组织之命为你提供参考答案,编程尚未成功,同志仍需努力!

Favorite_988
Favorite_988   2016.04.14 15:48

看看我的图片说明

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!