Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

python dictionary to sql update

fields = self.dictionary.keys()
vals = self.dictionary.values()

stmt = "UPDATE TABLE table_name SET %s = '%s'" %(.join(fields), .join(vals))"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #dictionary #sql #update
ADD COMMENT
Topic
Name
8+9 =