hi, does anyone have idea to modify structure od existing database, say example, i have a table in mysql, and this table contains 5 fields/columns now, we now allow user to add existing fields/columns in the existing table, can we do that ? thank you !
we should use ? when using prepared statement. afterwards by doing
pStmt.setString(1, "example");
the first ? of your string gets changed by the value. in this case ? would be changed into "example".
- it will allow you to set the value on the fly - it will save you from sql injection - easy in writing. dont really have to bother with string concatenations - prepared statements are precompiled unlike statement