Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python sqlite column names

import sqlite3
connection = sqlite3.connect('~/foo.db')
cursor = connection.execute('select * from bar')

# cursor.description is the description of columns
names = [description[0] for description in cursor.description]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #sqlite #column #names
ADD COMMENT
Topic
Name
2+3 =