Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- import sqlite3
- conexao = sqlite3.connect("locadora.db")
- cur = conexao.cursor()
- comando = "update clientes set nome = 'Maria conceição' where codigo_cliente = 2"
- cur.fetchall()
- cur.execute(comando)
- conexao.commit()
- comando = "select * from clientes "
- cur.execute(comando)
- result = cur.fetchall()
- for contato in result:
- print("Codigo: %s\tNome: %s" %(contato[0],contato[1]))
- conexao.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement