dimanche 3 janvier 2016

SQLite incorrect CREATE TABLE statement does not raise any error or warning

When I run an incorrect statement in Python I do not get any error or warning. The statement looks like this:

CREATE TABLE mystery_table(id mystery_type)

As you see, I'm using here an incorrect data type mystery_type, still table is created and when I run

SELECT name FROM sqlite_master where type = 'table'

I get a list of tables with mystery_table among them. So, why is that? Why is it possible to run some rubbish statement and get some result?? Thanks! PS. I run all this commands not in sqlite3 prompt, but through Python.

Aucun commentaire:

Enregistrer un commentaire