插入语句中的 SQL 语法错误 170 [英] SQL syntax error 170 in insert statement
问题描述
这是我的 SQL 语句,在第 4 行出现 Error 170 Incorrect syntax',' at line 4
here is my SQL statement and I am getting Error 170 Incorrect syntax near ',' at line 4
INSERT INTO SEO_Permalink_Test
( IDObjekt ,IDType ,IDLanguage ,StateSEOName ,StateSEOPermalink ,DatumErstellungSEOName ,DatumLetzteAenderungSEOName ,SEOName)
VALUES
( 19988 , 72 , 1 , 0 , 0 , GETDATE() , GETDATE() , 'H_KDA1559_ST_004' ),
( 19989 , 72 , 1 , 0 , 0 , GETDATE() , GETDATE() , 'H_KDA1559_FS_003' ) ,
( 19997 , 72 , 1 , 0 , 0 , GETDATE() , GETDATE() , 'H_CAU0171_WO_015' ) ,
( 19998 , 72 , 1 , 0 , 0 , GETDATE() , GETDATE() , 'H_KDA1559_ST_003' ) ,
( 19999 , 72 , 1 , 0 , 0 , GETDATE() , GETDATE() , 'H_KDA1559_FS_001' ) ,
( 20001 , 72 , 1 , 0 , 0 , GETDATE() , GETDATE() , 'H_ILI0758_AU_007' ) ,
( 20002 , 72 , 1 , 0 , 0 , GETDATE() , GETDATE() , 'H_ILI0758_PO_011' ) ,
( 20003 , 72 , 1 , 0 , 0 , GETDATE() , GETDATE() , 'H_ILI0758_RS_008' ) ,
( 20004 , 72 , 1 , 0 , 0 , GETDATE() , GETDATE() , 'H_CIT0550_WO_002' ) ,
( 20005 , 72 , 1 , 0 , 0 , GETDATE() , GETDATE() , 'H_CIT0550_WO_003' ) ,
( 20006 , 72 , 1 , 0 , 0 , GETDATE() , GETDATE() , 'H_CIT0550_TR_001' ) ,
( 20007 , 72 , 1 , 0 , 0 , GETDATE() , GETDATE() , 'H_CIT0550_RS_001' ) ,
( 20008 , 72 , 1 , 0 , 0 , GETDATE() , GETDATE() , 'H_CSL0152_AU_001' )
推荐答案
我猜是 SQL Server 2005 或更低版本
I am guessing that it is SQL Server 2005 or below
来自:http://msdn.microsoft.com/en-us/library/ms174335%28v=sql.100%29.aspx
SQL Server 2008 引入了 Transact-SQL 行构造函数(也称为表值构造函数)来指定 单个 INSERT 语句.行构造函数由单个VALUES 子句带有括在括号中的多个值列表和用逗号分隔.有关详细信息,请参阅表值构造函数 (Transact-SQL).
SQL Server 2008 introduces the Transact-SQL row constructor (also called a table value constructor) to specify multiple rows in a single INSERT statement. The row constructor consists of a single VALUES clause with multiple value lists enclosed in parentheses and separated by a comma. For more information, see Table Value Constructor (Transact-SQL).
这篇关于插入语句中的 SQL 语法错误 170的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!