Re: PEP 249 ( Im getting syntax error)

"Dieter Maurer" <[email protected]> Wed, 24 Jun 2020 18:24:23 +0200
Newsgroups gmane.comp.python.db
Message-ID <[email protected]>
Vishal Gupta wrote at 2020-6-22 23:28 +0530:
>mydatatables.execute('''CREATE TABLES STUDENTS (
>studentID INTEGER PRIMARY AUTOINCREMENT KEY,
>CLASS INTEGER,
>SECTION TEXT (1) NOT NULL,
>ROLLNO INTEGER (2) NOT NULL,
>MARKS REAL NOT NULL,
>RANKING INTEGER (2) NOT NULL,
>INTEREST TEXT (10) ,
>SPORTS TEXT (10) NOT NULL,
>CODING BOOLEAN NOT NULL);''')
>mydatabase.close()
>
>SyntaxError: multiple statements found while compiling a single statement

While I do not see multiple statements, a see
a "CREATE TABLES" which almost surely should by "CREATE TABLE" (without "S"
suffix).
_______________________________________________
DB-SIG maillist  -  [email protected]
https://mail.python.org/mailman/listinfo/db-sig