반응형
250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Airflow
- JavaScript
- Spring Error
- node
- chart.js
- chartjs
- Python
- VPN
- Spring
- aws cicd
- kubeflow
- Kafka
- codedeploy error
- IntelliJ
- 도커
- codedeploy
- docker
- PostgreSQL
- SQL
- Jenkins
- or some instances in your deployment group are experiencing problems.
- redis
- Flux
- bootstrap
- AWS CI/CD 구축하기
- COALESCE
- aws
- java bigdecimal
- codebuild
- codepipeline
Archives
- Today
- Total
목록python db select 문 출력하기 (1)
Small Asteroid Blog
[python] python db select 문 출력하기
python과 db 를 연결한 내용은 conn 이다. execute 메서드를 호출해 sql명령어를 입력한다. cur = conn.cursor() cur.execute("select * from ptck.news_save ") cr = cur.fetchall() for x in cr: print(x) 함수로 sql 문을 사용하는 방법이다. cur 은 db connect 에 대한 내용이다. 위의 cur = conn.cursor() 로 보면된다. #함수로 필요한 데이터 호출 def readDB(self,schema,table,colum): sql = "select {colum} from {schema}.{table}".format(colum=colum,schema=schema,table=table) try: ..
백엔드/Python
2021. 10. 28. 09:24