我是 Microsoft SQL Server 的新手,我遇到以下问题。
在数据库中,我有一个名为 VulnerabilityAlertDocument 的非常大的表,我必须在此表上进行插入。
所以我创建了以下插入查询:
INSERT INTO VulnerabilityAlertDocument (
[Id], [VulnerabilityAlertId], [SourceId], [BugTraqID], [Title],
[StatusID], [CVE], [Published], [LastUpdated], [Remote],[Local],
[Credibility],[Classification],[Availability], [Ease], [Authentication],
[CVSS2_BaseScore], [CVSS2_TemporalScore], [CVSS2_BaseVector],
[CVSS2_TemporalVector], [CVSS1_BaseScore], [CVSS1_TemporalScore],
[NVD_CVSS2_BaseScore], [NVD_CVSS2_ComponentString], [ImpactRating],
[Severity], [EaseofExploit], [UrgencyRating], [LastChange],
[ShortSummary], [Impact], [TechnicalDescription], [AttackScenario],
[Exploit], [Credit], [URL], [AlertStatusId], [Type], [DetailLevel],
[Language], [dd]
VALUES ('10000', '10000', 'TEST', '12345', 'TEST TITLE', '46967', 'TEST CVE',
'2010-12-19 00:00:00.000', '2011-06-29 20:49:07.000', 'Yes','No',
'Vendor Confirmed', 'Boundary Condition Error', 'Always',
'No Exploit Available', 'Not Required', 'N.A.', 'N.A.', 'N.A.', 'N.A.'
'N.A.', 'N.A.', 'N.A.', 'N.A.', '6', '7,8', '0', '6,8', 'N.A.',
'TEST SHORT SUMMARY', 'TEST IMPACT', 'TEST TECHNICAL DESCRIPTION',
'TEST ATTACK SCENARIO', 'TEST EXPLOIT', 'TEST CREDIT', '46967', '-1',
'-1', '-1', 'NULL');
我按照此处显示的语法:http://technet.microsoft.com/it-it/library/ms174633.aspx
但它不起作用。当我执行INSERT
命令时,我收到以下消息错误:
消息156,级别15,状态1,行2关键字附近的语法不正确 * '价值'。 *
为什么呢?可能是什么问题呢?我该如何解决?
答案 0 :(得分:8)
您在)
之前缺少右括号VALUES
。
答案 1 :(得分:1)
试试这个
INSERT INTO VulnerabilityAlertDocument ([Id], [VulnerabilityAlertId], [SourceId], [BugTraqID], [Title], [StatusID], [CVE], [Published], [LastUpdated], [Remote], [Local], [Credibility], [Classification], [Availability], [Ease], [Authentication], [CVSS2_BaseScore], [CVSS2_TemporalScore], [CVSS2_BaseVector], [CVSS2_TemporalVector], [CVSS1_BaseScore], [CVSS1_TemporalScore], [NVD_CVSS2_BaseScore], [NVD_CVSS2_ComponentString], [ImpactRating], [Severity], [EaseofExploit], [UrgencyRating], [LastChange], [ShortSummary], [Impact], [TechnicalDescription], [AttackScenario], [Exploit], [Credit], [URL], [AlertStatusId], [Type], [DetailLevel], [Language], [dd])
VALUES('10000', '10000', 'TEST', '12345', 'TEST TITLE', '46967', 'TEST CVE', '2010-12-19 00:00:00.000', '2011-06-29 20:49:07.000', 'Yes', 'No', 'Vendor Confirmed', 'Boundary Condition Error', 'Always', 'No Exploit Available', 'Not Required', 'N.A.', 'N.A.', 'N.A.', 'N.A.' 'N.A.', 'N.A.', 'N.A.', 'N.A.', '6', '7,8', '0', '6,8', 'N.A.', 'TEST SHORT SUMMARY', 'TEST IMPACT', 'TEST TECHNICAL DESCRIPTION', 'TEST ATTACK SCENARIO', 'TEST EXPLOIT', 'TEST CREDIT', '46967', '-1', '-1', '-1', 'NULL');