update Table Statement SQL
fun updateTableStatementSQL(tableName: String, updateFields: List<String>, whereFields: List<String>, schemaName: String?): String
Creates an SQL string for a prepared statement to update records in a table. The update and where field lists should have unique elements and at least 1 element.
val fields = listOf("A", "B", "C")
val where = listOf("D", "E")
val sql = DatabaseIfc.updateTableStatementSQL("baseball", fields, where, "league")
Produces:
update league.baseball set A = ?, B = ?, C = ? where D = ? and E = ?
Content copied to clipboard