摘要:
drop procedure if exists p_hello_world; create procedure p_hello_world(in v_id int) begin if (v_id > 0) then select '> 0'; elseif (v_id = 0) then select '= 0'; else ... 阅读全文
摘要:
日志 阅读全文
摘要:
ini文件 阅读全文
摘要:
#coding=utf-8 #!/usr/bin/python import json; dict = {}; dict['name'] = 'nick'; dict['say'] = 'hello world...'; dict['age'] = '20'; dict_json = repr(dict); print dict_json; dict_json_2 = json.dum... 阅读全文
摘要:
#coding=utf-8 #!/usr/bin/python import logging; a = 'abc'; print 'Y' if isinstance(a, str) else 'N'; 阅读全文
摘要:
#coding=utf-8 #!/usr/bin/python a = 'abc'; print isinstance(a, str); 阅读全文
摘要:
#coding=utf-8 #!/usr/bin/python def setConfig(): hello = 'world'; print 'The value has been setted.'; return hello; hello_cp = setConfig(); print 'print outside : ' + hello_cp; ... 阅读全文
摘要:
select insert update delete 阅读全文
摘要:
#coding=utf-8 #!/usr/bin/python final_list = ('a', 1, 'b', 2, 'c', 3); print final_list[0]; print final_list[1:3]; print final_list * 2; print final_list + final_list + final_list; # 原组不能被重新赋值 #... 阅读全文
摘要:
#coding=utf-8 #!/usr/bin/python list = ['a', 1, 'b', 2, 'c', 3]; print list[0]; print list[1:3]; print list * 2; print list + list + list; # 遍历 print('for each method 1 : '); for data in list: ... 阅读全文
摘要:
#coding=utf-8 #!/usr/bin/python str1 = None; str2 = ''; str3 = ' '; if str1 == None : print("str1 is none."); else : print("str1 is not none."); if str2 == None : print("str2 is none... 阅读全文
摘要:
Right Wrong 阅读全文
摘要:
001.print_hello_world 002.print_chinese 阅读全文
摘要:
>参考de优秀文章 写MySQL存储过程实现动态执行SQL Dynamic cursor in stored procedure MySQL通过视图(或临时表)实现动态SQL(游标)。 因在实现中,需要通过DDL语句创建视图(或临时表)、删除视图(或临时表),故,只适合在一些一次性的脚本中使用,比如 阅读全文
摘要:
drop procedure if exists p_hello_world; create procedure p_hello_world() begin declare id integer; declare username varchar(256); declare result varchar(4000) default ''; /* don't ... 阅读全文
摘要:
drop procedure if exists p_hello_world;create procedure p_hello_world()begin declare v_number int; declare v_varchar varchar(32); set v_number = 1; se 阅读全文
摘要:
drop procedure if exists p_hello_world; create procedure p_hello_world() begin select sysdate(); end; call p_hello_world(); drop procedure if exists p_hello_world; create procedure p_hel... 阅读全文
摘要:
前补0的格式化方式在业务系统中经常使用,记录下此api。 Java: MySQL: 阅读全文
摘要:
package No04_条件判断; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStreamWriter; import java.io.Writer; import java.util.ArrayList; import java.util.HashMap; import java... 阅读全文
摘要:
package No03_使用map绑定多个参数; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStreamWriter; import java.io.Writer; import java.util.ArrayList; import java.util.HashMap; impo... 阅读全文
摘要:
package No02_绑定单个参数; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStreamWriter; import java.io.Writer; import java.util.HashMap; import java.util.Map; import freemar... 阅读全文
摘要:
package No01_获取模板并直接输出; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStreamWriter; import java.io.Writer; import freemarker.template.Configuration; import freemarker... 阅读全文
摘要:
DECLARE v_sql VARCHAR2(1000) := ''; v_count NUMBER; BEGIN v_sql := v_sql || 'select count(1) from scott.emp t'; EXECUTE IMMEDIATE v_sql INTO v_count; dbms_output.put_li... 阅读全文
摘要:
CREATE OR REPLACE FUNCTION function_name RETURN DATE AS v_date DATE; BEGIN SELECT t.hiredate INTO v_date FROM scott.emp t WHERE rownum = 1; dbms_output.put_line(v_date); RETURN v_dat... 阅读全文
摘要:
declare v_sal number(5) := 6000; begin --if you could not see the output in console, you should set output on first use the command in command line : set serveroutput on dbms_output.put_l... 阅读全文