import sqlite3
conn = sqlite3.connect('my_database.db')
cursor = conn.cursor()
cursor.execute(''' CREATE TABLE IF NOT EXISTS Ages ( name VARCHAR(128), age INTEGER ) ''')
cursor.execute('DELETE FROM Ages')
rows_to_insert = [ ('Mara', 28), ('Otto', 33), ('Fyn', 31), ('Neshawn', 17) ] cursor.executemany('INSERT INTO Ages (name, age) VALUES (?, ?)', rows_to_insert)
conn.commit()
cursor.execute('SELECT hex(name || age) AS X FROM Ages ORDER BY X')
result_rows = cursor.fetchall()
if result_rows: first_row = result_rows[0][0] print("The first row in the resulting record set:", first_row)
cursor.close() conn.close()