I am working on creating a new table within my database. I have done this before when creating other tables but this time I am facing a syntax error. As far as i can see, the syntax is correct. So, I cannot figure it out.
Below, there is a code snippet of the statement that is throwing the error:
cursor.execute('''
CREATE TABLE IF NOT EXISTS order(
orderID INTEGER PRIMARY KEY,
productname STRING,
productprice FLOAT,
productquanitity INTEGER,
producttotal INTEGER;''')
This is the error:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python34\lib\tkinter\__init__.py", line 1533, in __call__
return self.func(*args)
File "N:/NEW/cashregister.py", line 42, in okitem
producttotal INTEGER;''')
sqlite3.OperationalError: near "order": syntax error
I would be grateful for some suggestions on why this has occurred.