#include<iostream> using namespace std; const int N=1010; int p[N]; int find(int x) { if(p[x]!=x) p[x]=find(p[x]); return p[x]; } int main() { int t; ...
分类:
其他好文 时间:
2020-02-01 16:18:08
阅读次数:
47
mysql5.7及以后的版本 select查询字段未出现在group by 中是会报错的 需要在命令行中执行以下命令: 这只是单次生效,重启Mysql后会失效,如果要永久生效需要修改my.cnf set @@global.sql_mode='STRICT_TRANS_TABLES,NO_ZERO_I ...
分类:
数据库 时间:
2020-02-01 14:28:38
阅读次数:
169
To Bottom In this Document Goal Solution References APPLIES TO: Oracle Database - Enterprise Edition - Version 9.0.1.0 to 12.1.0.1 [Release 9.0.1 to 1 ...
分类:
其他好文 时间:
2020-02-01 01:06:51
阅读次数:
233
mysql的基本用法: 查库:select schema_name from information_schema.schemata 等同于 show databases 查表:select table_name from information_schema.tables where table_ ...
分类:
数据库 时间:
2020-01-31 15:55:44
阅读次数:
116
1、查看数据库及用户名 ./psql -l 2、以oftenlin 用户登陆 postgres 数据库 ./psql -d postgres -U oftenlin3、列举表,相当于mysql的show tables \dt4、查看表结构,相当于desc tblname,show columns f ...
分类:
数据库 时间:
2020-01-31 12:26:30
阅读次数:
199
SELECT CONCAT( 'ALTER TABLE ' ,TABLE_NAME ,' ENGINE=INNODB, ROW_FORMAT=DYNAMIC; ') as `sql-commands-for-convert-engine` FROM information_schema.TABLES ...
分类:
数据库 时间:
2020-01-31 10:51:41
阅读次数:
99
1、查询是否锁表 show OPEN TABLES where In_use > 0; 查询到相对应的进程 然后 kill id 2、查询进程 show processlist 补充: 查看正在锁的事务 SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS; 查 ...
分类:
数据库 时间:
2020-01-30 22:43:02
阅读次数:
111
import osimport timeimport tarfileimport zipfile'''mysqldumpUsage: mysqldump [OPTIONS] database [tables]OR mysqldump [OPTIONS] --databases [OPTIONS] D ...
分类:
数据库 时间:
2020-01-29 14:00:26
阅读次数:
144
SELECT CONCAT( 'ALTER TABLE ', table_name, ' RENAME TO db_', substring(table_name, 4), ';' ) FROM information_schema. TABLES WHERE table_name LIKE 'ct ...
分类:
其他好文 时间:
2020-01-28 17:23:51
阅读次数:
72
一、管理用户 1.查询用户 第一步:切换到MySQL数据库 use mysql; 第二步:查询user表 select * from user; 两条记录都是root用户 ,其中第一条记录表示本机访问,第二条记录是远程访问。 注意:通配符%表示可以在任意主机登录查询数据库 2.新增用户 语法:cre ...
分类:
数据库 时间:
2020-01-28 17:09:46
阅读次数:
80