Untitled-checkpoint



In [1]:
import sqlite3

In [5]:
conn1 = sqlite3.connect(':memory:')

In [6]:
curs = conn.cursor()

In [8]:
curs.execute('create table tab1 (n integer)')


Out[8]:
<sqlite3.Cursor at 0x104607110>

In [13]:
curs.execute('select * from tab1').fetchall()


Out[13]:
[]

In [14]:
conn2 = sqlite3.connect(':memory:')

In [15]:
curs2 = conn2.cursor()

In [16]:
curs2.execute('select * from tab1').fetchall()


---------------------------------------------------------------------------
OperationalError                          Traceback (most recent call last)
<ipython-input-16-473ac4f094df> in <module>()
----> 1 curs2.execute('select * from tab1').fetchall()

OperationalError: no such table: tab1

In [ ]: