我不知道这个 SQL 语法有什么问题。我正在使用 MySQL 3.3.1
所有这些空字段都是 varchar 或 text。有这么多空字段的原因是由于 UI 要求,我想插入只有基本信息的记录,然后再填充详细信息。
INSERT INTO projtrackingoppor(address,latLong,stage,projType,dateInitiated,designProjNumber,constrProjNumber,designProjManager,clientContact,client,notes,nextAction,dueDate,designCriteria,designBearingCapacity,designGroundMotion_SLS,allowableSettlement_SLS,allowableLateralDisplacement_SLS,designGroundMotion_ULS,allowableSettlement_ULS,allowableLateralDisplacement_ULS,otherDeisgnCriteria,siteDescription,subsurfaceConditions,as-BuiltImprovementType_1,as-BuiltDiameter_1,as-BuiltDepth_1,as-BuiltSpacing_1,as-BuiltPrice_1,commentsOnPrice_1,proposedImprovementType_2,proposedDiameter_2,proposedDepth_2,proposedSpacing_2,proposedPrice_2,commentsOnPrice_2,proposedImprovementType_3,proposedDiameter_3,proposedDepth_3,proposedSpacing_3,proposedPrice_3,commentsOnPrice_3,proposedImprovementType_4,proposedDiameter_4,proposedDepth_4,proposedSpacing_4,proposedPrice_4,commentsOnPrice_4,proposedImprovementType_5,proposedDiameter_5,proposedDepth_5,proposedSpacing_5,proposedPrice_5,commentsOnPrice_5,soilDescription_a,Ic_a,midlayerDepth_a,finesContent_a,WC_a,LL_a,PI_a,PRE_qtncs_N160cs_a,POST_qtncs_N160cs_a,comments_a,soilDescription_b,Ic_b,midlayerDepth_b,finesContent_b,WC_b,LL_b,PI_b,PRE_qtncs_N160cs_b,POST_qtncs_N160cs_b,comments_b,soilDescription_c,Ic_c,midlayerDepth_c,finesContent_c,WC_c,LL_c,PI_c,PRE_qtncs_N160cs_c,POST_qtncs_N160cs_c,comments_c) VALUES ("test new add job","-40.07807143,175.73730469","4","4","2013-06-03","13123","","","","","","","0000-00-00","0","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","")
错误信息是
#1064 - 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 1 行的 'as-BuiltImprovementType_1,as-BuiltDiameter_1,as-BuiltDepth_1,as-BuiltSpacing_1,a' 附近使用正确的语法