我目前正在使用Java中的腳本將一堆書從冗長的純文本文件導入數據庫。我將所有書籍解析爲書籍對象,並試圖將它們寫入數據庫。但是,我得到一個丟失的逗號例外「ORA-00917:缺少逗號」在下面的字符串:Java JDBC SQL異常
INSERT INTO THE_TABLE VALUES('Yes' , '50388,50389' , 'Humanities and Performing Arts' , 'Required' , 'Ember, Carol & Ember, Melvin' , 'Human Culture' , '2nd' , '2012' , 'Pearson' , 'This is for CRN's 4879 & 2486' , '9780205251438' , '50' , 'null' , 'null' , 'null' , 'Spring 2013' , 'ROTN 4270' , 'Required' , 'Ember, Carol & Ember, Melvin,' , 'Human Culture' , 'Pearson,' , '2nd' , 'Edition,' , '2012.' , 'null' , 'Not Applicable' , 'Not Applicable' , 'Not Applicable' , 'Spring 2013' , 'ANTH 270' , '50388,50389' , 'Humanities and Performing Arts' , 'Required' , 'This is for CRN's 15454 & 48456, 'Ember, Carol & Ember, Melvin,' , 'Human Culture' , 'Pearson,' , '2nd' , 'Edition,' , '2012.' , '9780205251438' , '50' , 'null' , 'null' , 'Not Applicable' , 'Not Applicable' , 'Not Applicable' , 'null' , 'null' , 'null')
我看不到的地方有一個逗號丟失。這種例外可能還有其他原因嗎?
...這就是爲什麼我們使用準備好的語句和參數。 –