Aug-10-2020, 01:53 PM
I'm attempting to use the following piece of code to create a table in an SQLite3 database
cursor.execute("""CREATE TABLE IF NOT EXISTS Authors(Name text PRIMARY KEY, PlaceofBirth text NOT NULL,);""") # creates the Authors table with Name and PoB as fieldsBut I get this error:
Error:File "c:/Users/djwil/Documents/python/learning python/Chapter 18 - SQLite/Ch18-c3.py", line 6, in <module>
cursor.execute("""CREATE TABLE IF NOT EXISTS Authors(Name text PRIMARY KEY,
sqlite3.OperationalError: near ")": syntax error
Can anyone offer any advice