Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python ON DUPLICATE KEY UPDATE

# key-values werden erkannt -> Daten werden überschrieben 
# key-values = symbol, time -> der Rest wird überschrieben...
insertRates = "INSERT INTO Rates ( symbol, time, open, high, low, close, " 
insertRates += "tick_volume, spread, real_volume ) VALUES "
insertRates += "( %s, %s, %s, %s, %s, %s, %s, %s, %s ) " 
insertRates += "ON DUPLICATE KEY UPDATE "
insertRates += "open = VALUES( open ), high = VALUES( high ), "
insertRates += "low = VALUES( low ), close = VALUES( close ) , "
insertRates += "tick_volume = VALUES( tick_volume ), spread = VALUES( spread), "
insertRates += "real_volume = VALUES( real_volume ); "
Comment

PREVIOUS NEXT
Code Example
Python :: append and extend in python 
Python :: reload class module python 
Python :: keras model 2 outputs 
Python :: python comments 
Python :: how to make a random number generator in python 
Python :: odoo model 
Python :: connect with database python 
Python :: urllib_errors 
Python :: extracting values in pandas 
Python :: np logical not 
Python :: create sqlite table in python 
Python :: zip function python 
Python :: python int in list 
Python :: python inline if 
Python :: how to form .cleaned data in class based views in django 
Python :: python numpy array subtract 
Python :: default python packages 
Python :: recursion in python 
Python :: python bin() 
Python :: fast api template syntax 
Python :: python isdigit 
Python :: remove key from dictionary python 
Python :: django login required as admin 
Python :: python skip line 
Python :: dataframe select row by index value 
Python :: check if value is in series pandas 
Python :: python print int operations 
Python :: python list append() 
Python :: os module in python 
Python :: datetime convert python 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =