INSERT INTO statement in SQL Server

前端 未结 1 1457
情歌与酒
情歌与酒 2020-12-22 14:30

I am trying to enter information into my table named Food_Log.

INSERT INTO Food_Log
(Person, Food, ServingSize, Date, Meal);
VALUES
(John,\'Cheerios\',2,\'         


        
相关标签:
1条回答
  • 2020-12-22 14:53

    Remove the ; before VALUES

    INSERT INTO Food_Log (Person, Food, ServingSize, Date, Meal)
    VALUES ('John','Cheerios',2,'2014-04-01','Breakfast');
    

    And date format is normally YYYY-MM-DD. And you forgot the quotes around John

    0 讨论(0)
提交回复
热议问题