[naturallywe can do more than fetch an entire tablethe full power of the sql language is at your disposal in pythoncurs execute('select namejob from people where pay 'curs fetchall([('sue''mus')('tom''mgr')('pat''dev')the last query fetches name and job fields for people who earn more than $ , the next is similarbut passes in the selection value as parameter and orders the result tablequery 'select namejob from people where pay >order by namecurs execute(query[ ]for row in curs fetchall()print(row('ann''mus'('sue''mus'('tom''mgr'('pat''dev'running updates cursor objects also are used to submit sql update statements to the database server-updatesdeletesand inserts we've already seen the insert statement at work let' start new session to perform some other kinds of updateswe begin with the same data we had in the prior sessionc:\pp \dbase\sqlpython import sqlite conn sqlite connect('dbase 'curs conn cursor(curs execute('select from people'curs fetchall([('bob''dev' )('sue''mus' )('ann''mus' )('tom''mgr' )('kim''adm' )('pat''dev' )the sql update statement changes records--the following changes three recordspay column values to (bobannand kim)because their pay was no more than $ , as usualthe cursor' rowcount gives the number of records changedcurs execute('update people set pay=where pay <?'[ ]curs rowcount curs execute('select from people'curs fetchall([('bob''dev' )('sue''mus' )('ann''mus' )('tom''mgr' )('kim''adm' )('pat''dev' )the sql delete statement removes recordsoptionally according to condition (to delete all recordsomit the conditionin the followingwe delete bob' recordas well as any record with pay that is at least $ , databases and persistence