Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
425 views
in Technique[技术] by (71.8m points)

sql - Java, Derby Database, SQLException: Values clause must contain at least one element. Empty values are not allowed

I′m trying to execute this query in Derby Database using Java and Netbeans but it always throws "SQLSyntaxErrorException: Values clause must contain at least one element. Empty values are not allowed"

Code:

cc.s.executeUpdate("INSERT INTO TRABAJO (TITULO, DESCRIPCION, MONTOPAGADO, TOTALAPAGAR) VALUES ('Ahhh', 'op', 0, 12590)");

I have already used the same syntax for another table and it actually works fine. Even if I run the following code as a SQL Query it works so I don′t know what is wrong.

INSERT INTO TRABAJO (TITULO, DESCRIPCION, MONTOPAGADO, TOTALAPAGAR) VALUES ('Ahhh','op',0, 12590);

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...