今天碰到一个非常奇怪的问题问题,一条SQL语句在PL/SQL developer中很慢,需要9s,问题SQL: SELECT * FROM GG_function_location f WHERE f.parent_id ='03000000000001'; 表GG_function_location有5千万的数据,parent_id上是有索引的. 诊断第一步:就在PL/SQL developer中按F5,看到的执行计划是走索引的,应该不会慢啊. 第二步:在sqlplus中用autotrace
mysql当插入重复时更新的方法: 第一种方法: 示例一:插入多条记录 假设有一个主键为 client_id 的 clients 表,可以使用下面的语句: INSERT INTO clients (client_id,client_name,client_type) SELECT supplier_id,supplier_name,'advertising' FROM suppliers WHERE not exists(select * from clients where clients.c
mysql当插入重复时更新的方法: 第一种方法: 示例一:插入多条记录 假设有一个主键为 client_id 的 clients 表,可以使用下面的语句: INSERT INTO clients (client_id,client_name,client_type) SELECT supplier_id,supplier_name,'advertising' FROM suppliers WHERE not exists(select * from clients where clients.c
转载自新浪博客 Sean 一. mysql中utf8编码的utf8_bin,utf8_general_cs,utf8_general_ci的区别 utf8_general_ci 不区分大小写,这个你在注册用户名和邮箱的时候就要使用. utf8_general_cs 区分大小写,如果用户名和邮箱用这个 就会照成不良后果 utf8_bin: compare strings by the binary value of each character in the string 将字符串每个字符串
当我们忘记mysql数据库密码时我们就无法正常进入数据库,也就无法修改密码,那么这时该怎么修改密码呢,这里教大家一个简单常用修改密码的方式. (如果图简单快速修改密码的话,直接跳过查询步骤,依照图上执行mysql→ use mysql→ update user set password=password('123456') where user='root' and host='localhost';,密码为123456) 工具/原料 mysql数据库 cmd命令行 方法/步骤 打开mysq
当使用apt-get update更新源时,出现下面"Hash Sum mismatch"的报错,具体如下:root@localhost:~# apt-get update............W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/main/source/Sources Hash Sum mismatchW: Failed to fetch http://us.archive.ubun
今天在帮同事查看一条删除的SQL语句执行出错的问题 SQL语句如下: 1 DELETE FROM LEAD_SYSTEM_MENU_ORG_REF as t WHERE t.resourceid='4028812348f28b890148f29253a80000' 这条SQL语句放到Oracle数据库中去执行是可以正常执行的,但是放到MySQL数据库中执行时就出现了如下的错误: 1 [Err] 1064 - You have an error in your SQL syntax; check
原博文出自于: http://www.cnblogs.com/xdp-gacl/p/4012853.html 感谢! 今天在帮同事查看一条删除的SQL语句执行出错的问题 SQL语句如下: 1 DELETE FROM LEAD_SYSTEM_MENU_ORG_REF as t WHERE t.resourceid='4028812348f28b890148f29253a80000' 这条SQL语句放到Oracle数据库中去执行是可以正常执行的,但是放到MySQL数据库中执行时就出现了如下的错误:
mysql workbench 建表时 - PK: primary key (column is part of a pk) 主键 - NN: not null (column is nullable) 非空 - UQ: unique (column is part of a unique key) 唯一 - AI: auto increment (the column is auto incremented when rows are inserted) 自增 - BIN: binary (i
MySQL Server8.0版本时出现Client does not support authentication protocol requested by server 解决方法: 1.root 命令行登录 2.use mysql 3.alter user '登录账号'@'%' identified with mysql_native_password by '登录密码'; 4.flush privileges 重新登录即可解决问题
最近在做数据的迁移,再将数据从mysql迁移至oracle时,部分sql语句进行了修改,在此对部分知识点进行记录: 参考资料:https://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_substring-index 1.[mysql]find_in_set: 语法:find_in_set(str,strList) -----> Return the index position of the first arg
为了不引起编码问题,一般在从navict for mysql导出一个数据库时在文件最前面添加这2句语句: CREATE DATABASE IF NOT EXISTS `` default character set utf8 COLLATE utf8_general_ci; USE ``; 其中在引号里填写的事数据库的名称