Robby Wu
2021-03-11 16:52
采纳率: 50%
浏览 67

mysql语法错误问题(详见代码)

不知道为什么下面的mysql运行说有语法错误,怎么看也看不出来,请各位帮忙看下,谢谢!

 

CREATE TABLE IF NOT EXISTS `bioRS`(
   `id` INT UNSIGNED AUTO_INCREMENT,
   `user` VARCHAR(20) NOT NULL,
   `location` VARCHAR(10) NOT NULL,  
   `la` FLOAT NOT NULL,
   `long` FLOAT NOT NULL,
   `gvi` FLOAT NOT NULL,
   `biodiversity` FLOAT NOT NULL,
   `picture` VARCHAR(30) NOT NULL,
   `time` VARCHAR(30) NOT NULL,
   PRIMARY KEY ( `id` )
)ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO bioRS
   (user, location, la, long, gvi, biodiversity, picture, time)
   VALUES
    ("root","TM",30.3369240833333,119.433672027777,0.0662138438624312,-1,"TM__1.JPG","2020:11:08 09:33:32");
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • CSDN问答专家001 2021-03-11 16:58
    已采纳
    INSERT INTO bioRS
       (user, location, la, `long`, gvi, biodiversity, picture, time)
       VALUES
        ("root","TM",30.3369240833333,119.433672027777,0.0662138438624312,-1,"TM__1.JPG","2020:11:08 09:33:32");
    

    long是MySQL的内置字段,需要加字符,你试试上面的

    点赞 1 打赏 评论
  • 1chenyuhan 2021-03-11 17:22

    MySQL 内置字段的原因

    把long改下就好了

    点赞 1 打赏 评论

相关推荐 更多相似问题