Python [ Python ] 파이썬 SQLite 데이터베이스 연결하기. ( sqlite3 라이브러리 ) 간단 예제_소스 코드 사진찍는 개발자 2018. 2. 22. 11:14 이웃추가 본문 기타 기능 SQLite 데이터베이스 테이블 생성하고, 출력하기. import sqlite3 # sqlite 데이터베이스 연결하기. dbpath = "test.sqlite" conn = sqlite3.connect(dbpath) # 테이블 생성하고 데이터 넣기. cur = conn.cursor() cur.executescript(""" /* items 테이블이 이미 있다면 제거하기 */ DROP TABLE IF EXISTS items; /* 테이블 생성하기 */ create table items( item_id integer primary key, name text unique, price integer ); /* 데이터 넣기 */ insert into items values(1, 'Apple'...
#
drop
#
insert
#
Python
#
select
#
SQLite
#
sqlite3