My question is inserted into the String data type, an error. After solving summary
-
insert into table (1 column names, column names ...... 2) values ( 'string 1', 'string 2', .......);
Value to be inserted to use single quotes
- If you insert a String value
insert into table (column names) values ( ' "+ String +"');
Project code
String sql="insert into blog (id,name,conten,data,sort) values ("+ID+",'"+NAME+"','"+CONTEN+"','"+TIME+"','"+SORT+"')";