随笔分类 - DB
摘要:select STRING_AGG(schooltypeno,',') from dm.codeschooltype where schooltypeno like '36%' 361,367,369,363,365,364,362,366 select tablename, case when s
阅读全文
摘要:软件下载地址均为其官网。 一.wget升级 yum install -y wget 二.sqlite3安装 sudo yum install sqlite-devel 查看sqlite3的版本 sqlite3 -version 三.sqlite3升级 下载源码 wget https://www.sq
阅读全文
摘要:E:\sqlite3>sqlite3 db_stu.sqlite3 "VACUUM;" E:\sqlite3>dir 驱动器 E 中的卷没有标签。 卷的序列号是 0672-3CDA E:\sqlite3 的目录 2023/05/16 17:33 <DIR> . 2023/05/16 17:33 <D
阅读全文
摘要:IFNULL() 函数用于判断第一个表达式是否为 NULL,如果为 NULL 则返回第二个参数的值,如果不为 NULL 则返回第一个参数的值。 SELECT IFNULL(NULL, "RUNOOB"); 以上实例输出结果为:RUNOOB SELECT CHAR_LENGTH('我爱祖国'); /*
阅读全文
摘要:1. case, count sql (mysql) SELECT (case when shi='1101' then 1 when shi='2101' then 2 when shi='3101' then 3 when shi='3206' then 4 when shi='5101' th
阅读全文
摘要:前提要开通访问策略和1521端口 import schedule import time import datetime import csv import shutil from django.core.management.base import BaseCommand, CommandErro
阅读全文
摘要:先备注一个不相干的指令: 变更用户密码: python manage.py changepassword username 一、 安装package pip install django-cryptography二、创建model from django.db import models from
阅读全文
摘要:参考: How do I unlock a SQLite database? 解决方式: 查一下谁lock,然后把进程kill掉 $ fuser db.sqlite3 > development.db: 5430 $ kill -9 5430
阅读全文
摘要:For retrieving the data, you have two options: 1) You can create Django models that correspond to your tables in the MySQL database. You can do this m
阅读全文
摘要:注意,本文是作者自己备份用,django oracle相关技术资料,请参考 oracle-django总结 https://stackoverflow.com/questions/4914775/django-inspectdb-issue-using-oracle-database https:/
阅读全文
摘要:一、正常流程 1.python manage.py makemigrations 或 python manage.py makemigrations appname 2. Python manage.py migrate python manage.py migrate appname 二、由于某种
阅读全文
摘要:一,查看mysql输出日志:cat /var/log/mysqlg.log 1,清空表数据并还原自增id truncate table '表名 '; 2,查看所有mysql库 show databases; 3,创建数据库 and 创建数据库并设置utf-8字符集 create database '
阅读全文
摘要:一、我的做法 设置2个参数,根据操作对象做切换。 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'lxg', 'USER': 'myname', 'PASSWORD': 'mypass', 'HOST
阅读全文
摘要:问题一 ubuntu下安装mysql ,参考 :https://www.django.cn/article/show-3.html 1. 安装后,没有编辑mysqld.cnf 因为安装时候弹出窗体,让输入root口令。(lxg) 进入mysql方式: xxx@lxg-opt:/etc/mysql$
阅读全文
摘要:一、我的环境 OS: 64位 windows7 oracle client: instantclient_11_2 ,为了连接pl/sql,只能32为 python:python-3.5.4 32位 cx_oracle:cx_Oracle-5.3-11g.win32-py3.5 下载地址:https
阅读全文
摘要:1. windows7 64位 , 下载了32位的 OracleXE112_Win32, 通过名称可以看出, 是11G版本。 下载很容易,注册oracle ,官网按名称查找下载。 2.安装。 中间出现了很多问题 最多的就是:KEY_XE.reg 找不到, 解决方法: (1)卸载,重新安装 (2) 出
阅读全文
摘要:一 问题 python 连接oracle时候,发生错误如标题。 我的cx_oracle各种问题已经解决, 请各位参考我这篇博文: windows环境 python 与 cx_oracle 连接 记录 二 解决 (1)确认自己的python版本,和 64(32)位 C:\Users\Administr
阅读全文

浙公网安备 33010602011771号