def _tableExists ( self , tableName ) : cursor = _conn . execute ( """
            SELECT * FROM sqlite_master WHERE name ='{0}' and type='table';
        """ . format ( tableName ) ) exists = cursor . fetchone ( ) is not None cursor . close ( ) return exists
python checking if a sql table record exist
def _tableExists(self, tableName):
        cursor=_conn.execute("""
            SELECT * FROM sqlite_master WHERE name ='{0}' and type='table';
        """.format(tableName))
        exists = cursor.fetchone() is not None
        cursor.close()
        return exists