随笔分类 -  数据库

摘要:步骤: 备份数据库 python manage.py dumpdata > dump.json 修改settings.py文件中默认数据库的配置 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2' 阅读全文
posted @ 2020-03-06 13:51 柔南青空 阅读(716) 评论(0) 推荐(0)
摘要:下载所需库 pip install psycopg2-binary settings.py中的配置(本地) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '<数据库名称>' 阅读全文
posted @ 2020-03-05 09:07 柔南青空 阅读(930) 评论(0) 推荐(0)
摘要:添加用户 create user <用户名> with password '<密码>'; 创建数据库并指定所属用户 create database django_test owner <用户名>; 切换数据库 postgres=# \c kydb 切换用户 postgres=# \c - kysys 阅读全文
posted @ 2020-03-05 09:00 柔南青空 阅读(226) 评论(0) 推荐(0)
摘要:使用SQL语句对ACCESS数据库进行模糊查询时: 在Access数据库中执行,发现可以查询出结果,select * from table_name where create_date like '2019-03-13*' 但是同样的语句放在c#程序中却查询为空 根据以往的开发经验,access中l 阅读全文
posted @ 2019-03-26 17:38 柔南青空 阅读(426) 评论(0) 推荐(0)