파이썬과 sqlite3를 이용해 간단한 전화메모 DB를 만들었다.
1. 먼저 데이터베이스를 만든다. import sqlite3conn = sqlite3.connect('tel.db') c = conn.cursor()c.execute(" create table tel ( id integer primary key autoincrement, name text, tel text, addr text, input_time text, memo text ) ")# Unlike DDL, DML (Data Manipulation Language) commands need to be commited/rolled back. c.close() 2. 데이터 입력 import sqlite3, osimport time conn = sqlite3.connect('tel.db') c = conn.cu..
카테고리 없음
2016. 10. 13. 22:39