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

浙公网安备 33010602011771号