Suppose that the file name of SQLite’s database is mpos_S.sqlite, its table (like a sheet of Excel) name is mpos_S, and mpos_S contains column data. If the column name of water temperature data is tp, this column tp contains water temperature data. In order to handle it from Python, you need to import sqlite3.
First connect to the database and get the cursor cur.

>>> import sqlite3
>>> conn = sqlite3.connect('mpos_S.sqlite')
>>> cur = conn.cursor()

Check information of columns.

>>> cur.execute("PRAGMA TABLE_INFO(mpos_S)")  ### Gets information about columns of table mpos_S
>>> cols = cur.fetchall()  ### Information of a column is a tuple containing 6 elements.
>>> print(cols)

To get only a name of column, the 2nd element should be taken using list comprehension.

>>> print([item[1] for item in cols])

Gets the values for the column tp. Multiple columns are selected by itemizing their names separating by comma.

>>> cur.execute("SELECT tp FROM mpos_S")  ### tp is the column name, mpos_S is table name.
>>> val = cur.fetchall()  ### val is a list of tuple containing values.
>>> print(val)

Gets data in all the columns.

>>> cur.execute("SELECT * FROM mpos_S")  ### * means all the columns. mpos_S is table name.
>>> val = cur.fetchall()  ### Extracted as a list of tuple
>>> print(val)

Always close the database when finished (Required).

>>> cur.close()
>>> conn.close()