okwe've now added six records to our database table let' run an sql query to see how we didcurs execute('select from people'curs fetchall([('bob''dev' )('sue''mus' )('ann''mus' )('tom''mgr' )('kim''adm' )('pat''dev' )run an sql select statement with cursor object to grab all rows and call the cursor' fetchall to retrieve them they come back to our script as sequence of sequences in this moduleit' list of tuples--the outer list represents the result tablethe nested tuples are that table' rowsand the nested tuple' contents are the column data because it' all python dataonce we get the query resultwe process it with normal python code for exampleto make the display bit more coherentloop through the query' result as usualcurs execute('select from people'for row in curs fetchall()print(row('bob''dev' ('sue''mus' ('ann''mus' ('tom''mgr' ('kim''adm' ('pat''dev' tuple unpacking comes in handy in loops heretooto pick out column values as we go here' simple formatted display of two of the columnsvaluescurs execute('select from people'for (namejobpayin curs fetchall()print(name':'paybob sue ann tom kim pat because the query result is sequencewe can use python' powerful sequence and iteration tools to process it for instanceto select just the name column valueswe can run more specific sql query and get list of tuplescurs execute('select name from people'names curs fetchall(names [('bob',)('sue',)('ann',)('tom',)('kim',)('pat',)or we can use python list comprehension to pick out the fields we want--by using python codewe have more control over the data' content and format databases and persistence