inserting new values into table the following code shows how to insert new items into tableimport sqlite conn sqlite connect("mydb"cur conn cursor(cur execute("insert into stocks values (?,?,?)",('ibm', , )cur execute("insert into stocks values (?,?,?)",('aapl', , )conn commit(when inserting valuesyou should always use the substitutions as shown each is replaced by value from tuple of values supplied as parameters if you have sequence of data to insertyou can use the executemany(method of cursor like thisstocks ('goog', , )('aa', , )('aig', cur executemany("insert into stocks values (?,?,?)",stocksupdating an existing row the following code shows how you might update columns for an existing rowcur execute("update stocks set shares=where symbol=?",( ,'ibm')againwhen you need to insert values into the sql statementmake sure you use the placeholders and supply tuple of values as parameters deleting rows the following code shows how to delete rowscur execute("delete from stocks where symbol=?",('scox',)performing basic queries the following code shows how you can perform basic queries and obtain the resultsselect all columns from table for row in cur execute("select from stocks")statements select few columns for sharesprice in cur execute("select shares,price from stocks")statements select matching rows for row in cur execute("select from stocks where symbol=?",('ibm',)statements select matching rows with ordering for row in cur execute("select from stocks order by shares")statements select matching rows with ordering in reverse for row in cur execute("select from stocks order by shares desc")statements joining tables on common column name (symbolfor row in cur execute("""select symbols sharesp price from stocks as sprices as using(symbol)""")statements lib fl ff