Wrong syntax
Posted by:
Arj Banner
Date: November 23, 2009 03:30AM
When I run the following code I get an error that "You have an error in your SQL Syntax". Here is my code, what is wrong with it?:
# import MySQL module
import MySQLdb
# connect
db = MySQLdb.connect(host="localhost", user="xxxx", passwd="xxxxxxx",
db="XXXXXXX")
# create a cursor
cursor = db.cursor()
# execute SQL statement
cursor.execute("""INSERT INTO sample table (abc_dx) VALUES ("A simple test")""")
Subject
Written By
Posted
Wrong syntax
November 23, 2009 03:30AM
November 23, 2009 10:33AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.