강좌
클라우드/리눅스에 관한 강좌입니다.
프로그램 분류

파이썬기초97 : 데이터베이스 트랜잭선처리 03

작성자 정보

  • 관리자 작성
  • 작성일

컨텐츠 정보

본문

import sqlite3

con = sqlite3.connect("./commit2.db")

cur = con.cursor()


cur.execute("create table PhoneBook(Name text, PhoneNum text);")


cur.execute("insert into PhoneBook values('derick', '010-111-2222');")

cur.execute("insert into PhoneBook values('Tom', '010-111-2222');")

cur.execute("insert into PhoneBook values('Sangjung', '010-111-2222');")

cur.execute("insert into PhoneBook values('Sam', '010-111-2222');")


con.commit()


관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,035 명
  • 현재 강좌수 :  35,795 개
  • 현재 접속자 :  147 명