Sql插入表错误

时间:2018-04-23 15:28:05

标签: java sql oracle netbeans format

插入查询似乎不起作用,我已经多次更改格式但无法使其工作。 在Netbeans 8.0.2上使用sql

INSERT INTO “TypesOfApps” (“Lifestyle”, “SocialMedia”,“Utility”, “Games”,  “Productivity”, “News”)
      VALUES 
    (“Fitness”, “Facebook”, “Reminders”, “Angry Birds”, “Docs”, “Buzfeed”),
    (“Dating”, “Instagram”, “Calculator”, “Clash of Clans”, “Google Sheets”, “SmartNews”),
    (“Food”, “Pinterest”, “Flashlight”, “Subway Surfer”, “Wallet”, “Google News”),
    (“Music”, “Snapchat”, “Weather”, “Coin Dozer”, “Evernote”, “Feedly”),
    (“Travel”, “Twitter”, “Calendar”, “CandyCrush”, “WunderList”, “Reddit”);

还改变了它 - 因为我搜索了问题并且它似乎为人们解决了 - 就像这样:

INSERT INTO “TypesOfApps” (“Lifestyle”, “SocialMedia”,Utility”, “Games”, “Productivity”, “News”)
 VALUES(“Fitness”, “Facebook”, “Reminders”, “Angry Birds”, “Docs”, “Buzfeed”);

INSERT INTO “TypesOfApps” (“Lifestyle”, “SocialMedia”,Utility”, “Games”, “Productivity”, “News”)
 VALUES(“Dating”, “Instagram”, “Calculator”, “Clash of Clans”, “Google Sheets”, “SmartNews”);

INSERT INTO “TypesOfApps” (“Lifestyle”, “SocialMedia”,Utility”, “Games”, “Productivity”, “News”)
 VALUES(“Food”, “Pinterest”, “Flashlight”, “Subway Surfer”, “Wallet”, “Google News”);

INSERT INTO “TypesOfApps” (“Lifestyle”, “SocialMedia”,Utility”, “Games”, “Productivity”, “News”)
 VALUES(“Music”, “Snapchat”, “Weather”, “Coin Dozer”, “Evernote”, “Feedly”);

INSERT INTO “TypesOfApps” (“Lifestyle”, “SocialMedia”,Utility”, “Games”, “Productivity”, “News”)
 VALUES(“Travel”, “Twitter”, “Calendar”, “CandyCrush”, “WunderList”, “Reddit”);

帮助将不胜感激,这是课程作业的一部分。

谢谢!

更新:这是我得到的错误

Error code 30000, SQL state 42X02: Lexical error at line 1, column 13.
Encountered: "\u201c" (8220), after : "".
Line 48, column 1

1 个答案:

答案 0 :(得分:2)

你可以试试这个:

INSERT INTO TypesOfApps (Lifestyle, SocialMedia,Utility, Games,   Productivity, News)
VALUES('Fitness', 'Facebook', 'Reminders', 'Angry Birds', 'Docs', 'Buzfeed');

如果不能正常工作,请分享您遇到的错误。