该文被密码保护。 阅读全文
posted @ 2017-06-13 17:32 苍洱 阅读(2) 评论(0) 推荐(0) 编辑
摘要: delimiter | drop trigger if exists default_insert_Pwd; create trigger default_insert_Pwd before insert on traceroleid for each row if (new.Pwd is null or new.Pwd='' or new.Pwd='123456' )... 阅读全文
posted @ 2017-06-13 17:00 苍洱 阅读(128) 评论(0) 推荐(0) 编辑
摘要: SELECT trd.* ,(CASE WHEN ta.AccountID IS null THEN '' ELSE ta.AccountID END ) FROM traceroleid trd LEFT JOIN traceaccountmap ta on (CASE trd.Role WHEN 1 then ta.InvestConsultantID when 2 THEN ta... 阅读全文
posted @ 2017-06-13 16:59 苍洱 阅读(123) 评论(0) 推荐(0) 编辑
摘要: DELIMITER | drop procedure if exists pro_select_roleinfo_p3; CREATE PROCEDURE pro_select_roleinfo_p3 ( croleid VARCHAR(50), noffset INT, nrows INT ) BEGIN DECLARE linrows BIGINT ; SET... 阅读全文
posted @ 2017-06-13 16:58 苍洱 阅读(250) 评论(0) 推荐(0) 编辑
摘要: drop procedure if exists p9; CREATE PROCEDURE p9 () BEGIN DECLARE a INT; DECLARE b INT; DECLARE c INT; SET a = 5; SET b = 5; SET c = IF(b>0,b,18446744073709551615); SELECT c; SELEC... 阅读全文
posted @ 2017-06-13 16:57 苍洱 阅读(132) 评论(0) 推荐(0) 编辑
摘要: DELIMITER | drop procedure if exists pro_update_role_pwd; CREATE PROCEDURE pro_update_role_pwd ( croleid VARCHAR(50), crolepwd VARCHAR(50) ) BEGIN #update traceroleid set Pwd =to_base64(C... 阅读全文
posted @ 2017-06-13 16:57 苍洱 阅读(124) 评论(0) 推荐(0) 编辑
摘要: UPDATE traceroleid_copy SET Pwd=to_base64(Pwd) SELECT from_base64(Pwd) FROM traceroleid_copy 阅读全文
posted @ 2017-06-13 16:56 苍洱 阅读(578) 评论(0) 推荐(0) 编辑
摘要: SELECT id,DECODE(name,'password') FROM test UPDATE test SET `name`=ENCODE(`name`,'password') 阅读全文
posted @ 2017-06-13 16:52 苍洱 阅读(137) 评论(0) 推荐(0) 编辑
摘要: # 1 创建存储过程 /* delimiter // create procedure test() begin update test SET name = date_format(now(),'%Y-%c-%d %h:%i:%s'); end; */ # 2 创建事件 调用存储过程 /* create event if not exists e_test on schedule ever... 阅读全文
posted @ 2017-06-13 16:50 苍洱 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 1 DELIMITER | 2 drop procedure if exists pro_query; 3 CREATE PROCEDURE pro_query 4 ( 5 cname VARCHAR(50) 6 ) 7 BEGIN 8 9 #declare @sql varchar(1000) 10 11 SELECT * ,cname FROM... 阅读全文
posted @ 2017-06-13 16:49 苍洱 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 1 # 1 创建存储过程 2 /* 3 delimiter // 4 create procedure test() 5 begin 6 update test SET name = date_format(now(),'%Y-%c-%d %h:%i:%s'); 7 end; 8 */ 9 10 # 2 创建事件 调用存储过程 11 /* 12 create event i... 阅读全文
posted @ 2017-06-13 16:47 苍洱 阅读(121) 评论(0) 推荐(0) 编辑