I am facing a weird issue. In TablePlus when I run the following command it returns table but same query does not work in Python.
SELECT
name
FROM
sqlite_schema
WHERE
type ='table'
AND
name NOT LIKE 'lookup%';
Python code is given below:
def get_connection():
path = 'data.sqlite3'
connection = sqlite3.connect(path)
return connection
sql_select = "SELECT name FROM sqlite_schema WHERE type ='table' AND name NOT LIKE 'lookup%';"
cursor = connection.execute(sql_select)
Error:
cursor = connection.execute(sql_select)
sqlite3.OperationalError: no such table: sqlite_schema
I am using SQLite 3.36
Change sqlite_schema for sqlite_master in PHP CPANEL VERSION 92, SUCCESS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With