【问题标题】:Why can't I insert datas in multiple rows in sql?为什么我不能在sql中插入多行数据?
【发布时间】:2016-12-27 13:01:09
【问题描述】:
INSERT INTO doctor (doc_id,doc_name,doc_speciality,doc_available,doc_info) values
    (5,'Jack Racheal','Gastric','yes','No one'),
    (6,'Yara Greyjoy','Respiratory problems','yes','Daughter of Balon Greyjoy'),
    (7,'Jared','Cancer','yes','Mastermind behing the Silicon Valley'),
    (8,'Avaiato','Respiratory problems','yes','Daughter of Howland Reed',
    (9,'Leo DiCaprio','Diabetes','yes','Django Unchained'),
    (10,'Danerys Targareyan','Respiratory problems','yes','Mother of Dragons'),
    (11,'Jon Snow','Jaundice','yes','Knows nothing'),
    (12,'Tyrion Lannister','Typhoid','yes','Knows something when he drinks'),
    (13,'Samwell Tarly','Gastric','yes','Step father of baby sam'),
    (14,'Cateyln Tully','Respiratory problems','yes','Red wedding'),
    (15,'Sandors Clegane','T.B','yes','The hound'),
    (16,'Arya Stark','Cholera','yes','The girl has no name')

【问题讨论】:

  • 你遇到了什么错误?
  • 你为什么不能?你有错误吗?有什么问题?
  • #1064 - 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 13 行的 '' 附近使用正确的语法

标签: mysql sql xampp


【解决方案1】:

id 8 是:

(8,'Avaiato','Respiratory problems','yes','Daughter of Howland Reed',

它似乎缺少一个结束括号。

(8,'Avaiato','Respiratory problems','yes','Daughter of Howland Reed'),

【讨论】:

  • 非常感谢戈登!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-08-02
相关资源
最近更新 更多