随笔分类 - MySQL
解决1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and b
摘要:声音:非原著,借鉴借鉴 1418 - This function has none of DETERMINISTIC, NOSQL, or READS SQL DATA in its declaration and binary logging isenabled (you *might* want
阅读全文
摘要:将 要排序 的列转为 GBK格式 convert(sys_code using gbk)
阅读全文
摘要:mysql 按类型分组 查询状态的个数和总数SELECT file_type,sum(data_count) total ,sum(case Load_status when 1 then data_count else null end) success ,sum(case Load_status when 0 then data_count else null end) fail from ...
阅读全文
摘要:create procedure sum1(a int) begin declare sum int default 0; -- default 是指定该变量的默认值 declare i int default 1; while i<=a DO -- 循环开始 set sum=sum+i; set
阅读全文
摘要:1、当你windows的服务中找不到mysql的服务,无法启动mysql服务时, 只需要在你的安装目录下 用cmd进入mysql的文件目录下的bin目录执行:mysqld.exe -install 安装服务 mysqld --remove mysql 删除服务 命令 net start mysql
阅读全文
摘要:Select COLUMN_NAME , data_type, CHARACTER_MAXIMUM_LENGTH, IS_NULLABLE,COLUMN_COMMENT from INFORMATION_SCHEMA.COLUMNSWhere table_name = 'plant_category
阅读全文
摘要:1、到网址上下载 生成mysql er图的工具 https://cdn.mysql.com//Downloads/MySQLGUITools/mysql-workbench-community-6.3.9-winx64.msi 2、在你安装的时候 系统会判断你是否安装 Visual C++ Redi
阅读全文
摘要:update A a INNER JOIN B b ON a.a_id=b.b_id set a.new_name = b.old_namewhere a.a_id='123456'
阅读全文
摘要:1、准备好要导入的数据 并且字段名 要跟数据库表中的字段一直 2、找到表名 双击打开 进入一下 页面,然后 点击导入 选择 后缀名为.xls 或者.xlsx 我这边是选择.xlsx 因为我的excel是2007以后的版本, 如果是2007以前的版本 选择.xls 3、下一步 选择你本地要导入的exc
阅读全文
摘要:mysql服务器创建用户 数据库等操作 一、连接 MYSQL 格式:mysql -h 主机地址 -u 用户名 -p 用户密码 一、连接 MYSQL 格式:mysql -h 主机地址 -u 用户名 -p 用户密码 一、连接 MYSQL 格式:mysql -h 主机地址 -u 用户名 -p 用户密码 1
阅读全文
摘要:INSERT INTO ciimp_privilege ( uuid,type,owner,privilege_code,company_code,department_code,loc_timezone,is_void) select replace (UUID(),'-',''),'U',use
阅读全文
摘要:date_sub(curdate(), interval dayofweek(curdate())+6 day) 上周初date_sub(curdate(), interval dayofweek(curdate())-1 day) 上周末
阅读全文
摘要:Case when a=xx then ‘xx’ when a=’zz’ then ‘zz’ else ‘cc’ end as 别名相当于 if-else if-elsecase when bid.bid_stage=1 then '招标阶段' when bid.bid_stage=2 then '
阅读全文
摘要:SELECT CONCAT(CONCAT(列名,’拼接在中间的符号’),列名) FROM `sys_auth` sa ;
阅读全文
摘要:查询sql时 改变列原来的类型SELECT create_time FROM ciimp_fin_invoice 本来要查询的 是 创建时间 时间类型 结果为 2017-03-29 03:29:40 SELECT create_time+’’ FROM ciimp_fin_invoice 在sql列
阅读全文
摘要:相同点:UNION 内部的 SELECT 语句相同数量的列。列的数据类型。顺序必须相同。不同点:UNION 操作符选取不同的值。UNION ALL允许重复的值。
阅读全文
摘要:-- mysql 时间日期函数类型和使用-- 1、DAY()、MONTH()、YEAR()——返回指定日期的天数、月数、年数;select day(CURDATE()) as '日' from dual; select month(CURDATE()) as '月' from dual; selec
阅读全文

浙公网安备 33010602011771号