随笔分类 - mysql
摘要:SELECT table_schema AS '数据库', sum( table_rows ) AS '记录数', sum( TRUNCATE ( data_length / 1024 / 1024, 2 )) AS `数据容量(MB)`, sum( TRUNCATE ( index_length
阅读全文
摘要:DROP FUNCTION IF EXISTS underlineToCamel ;CREATE FUNCTION underlineToCamel(paramString VARCHAR(200)) RETURNS varchar(200) CHARSET utf8DETERMINISTICbeg
阅读全文
摘要:SELECT table_schema, concat( TRUNCATE ( sum(data_length) / 1024 / 1024, 2 ), ' mb' ) AS data_size, concat( TRUNCATE ( sum(index_length) / 1024 / 1024,
阅读全文
摘要:最简单的父子结构表 函数创建语句: select version();#5.7.26show variables like "sql_mode";#sql_mode ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE
阅读全文
摘要:SELECT table_name , TABLE_COMMENT FROM INFORMATION_SCHEMA.TABLESWHERE table_schema = '******数据库名称*****'AND TABLE_COMMENT LIKE '%包含的注释%';
阅读全文
摘要:SELECT #CONCAT("truncate table ",table_name,";") table_name FROM information_schema. TABLESWHERE table_schema = 'scdm'AND TABLE_NAME NOT IN ( SELECT t
阅读全文
摘要:import http://64239.blog.51cto.com/54239/1846372/ 1、 对子查询的优化表现不佳。 2、 对复杂查询的处理较弱 3、 查询优化器不够成熟 4、 性能优化工具与度量信息不足 5、 审计功能相对较弱|伦理片 http://www.gxuy.com/ 6、
阅读全文
摘要:备份所有数据库且不锁表 mysqldump -h 192.168.1.1 -uusername -ppwd --all-databases --skip-lock-tables >aaa.sql mysqldump -uroot –p -n -t -q -e --databases db1 db2
阅读全文
摘要:UPDATE user SET Password = PASSWORD('123456') WHERE user = 'root'; alter user 'root'@'localhost' identified by '123'; set password for 'root'@'localho
阅读全文
摘要:# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html# *** DO NOT EDIT THIS FIL
阅读全文
摘要:http://jingyan.baidu.com/article/948f592413ab60d80ef5f964.html?qq-pf-to=pcqq.c2c
阅读全文
摘要:List rptResult = new ArrayList(); List tempResult = new ArrayList(); tempResult = //从数据库取出已order的数据集; rptResult = sortRPT(tempResult); @SuppressWarnin
阅读全文
摘要:show processlist; kill ***********
阅读全文
摘要:#use information_schema;#select concat('drop table ',table_name,';') from tables where TABLE_SCHEMA = 'nxpt';拼接删除SQL #select concat('TRUNCATE table ',
阅读全文
摘要:mysql 查看数据库中所有表的记录数 use information_schema; select table_name,table_rows from tables where TABLE_SCHEMA = 'testdb' order by table_rows desc;
阅读全文

浙公网安备 33010602011771号