上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: 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 ... 阅读全文
posted @ 2015-07-07 11:45 nick_huang 阅读(647) 评论(0) 推荐(0) 编辑
摘要: 日志 阅读全文
posted @ 2015-07-02 22:54 nick_huang 阅读(296) 评论(0) 推荐(0) 编辑
摘要: ini文件 阅读全文
posted @ 2015-07-02 22:46 nick_huang 阅读(305) 评论(0) 推荐(0) 编辑
摘要: #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... 阅读全文
posted @ 2015-07-02 22:42 nick_huang 阅读(308) 评论(0) 推荐(0) 编辑
摘要: #coding=utf-8 #!/usr/bin/python import logging; a = 'abc'; print 'Y' if isinstance(a, str) else 'N'; 阅读全文
posted @ 2015-07-02 22:30 nick_huang 阅读(292) 评论(0) 推荐(0) 编辑
摘要: #coding=utf-8 #!/usr/bin/python a = 'abc'; print isinstance(a, str); 阅读全文
posted @ 2015-07-02 22:28 nick_huang 阅读(211) 评论(0) 推荐(0) 编辑
摘要: #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; ... 阅读全文
posted @ 2015-07-02 22:26 nick_huang 阅读(278) 评论(0) 推荐(0) 编辑
摘要: select insert update delete 阅读全文
posted @ 2015-07-02 22:15 nick_huang 阅读(436) 评论(0) 推荐(0) 编辑
摘要: #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; # 原组不能被重新赋值 #... 阅读全文
posted @ 2015-07-02 22:11 nick_huang 阅读(268) 评论(0) 推荐(0) 编辑
摘要: #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: ... 阅读全文
posted @ 2015-07-02 22:10 nick_huang 阅读(771) 评论(0) 推荐(0) 编辑
摘要: #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... 阅读全文
posted @ 2015-07-02 22:07 nick_huang 阅读(394) 评论(0) 推荐(0) 编辑
摘要: Right Wrong 阅读全文
posted @ 2015-07-02 21:59 nick_huang 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 001.print_hello_world 002.print_chinese 阅读全文
posted @ 2015-07-02 21:58 nick_huang 阅读(198) 评论(0) 推荐(0) 编辑
摘要: >参考de优秀文章 写MySQL存储过程实现动态执行SQL Dynamic cursor in stored procedure MySQL通过视图(或临时表)实现动态SQL(游标)。 因在实现中,需要通过DDL语句创建视图(或临时表)、删除视图(或临时表),故,只适合在一些一次性的脚本中使用,比如 阅读全文
posted @ 2015-07-02 11:36 nick_huang 阅读(8432) 评论(0) 推荐(0) 编辑
摘要: 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 ... 阅读全文
posted @ 2015-07-01 18:42 nick_huang 阅读(523) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2015-07-01 18:40 nick_huang 阅读(1181) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-07-01 18:38 nick_huang 阅读(611) 评论(0) 推荐(0) 编辑
摘要: 前补0的格式化方式在业务系统中经常使用,记录下此api。 Java: MySQL: 阅读全文
posted @ 2015-07-01 13:55 nick_huang 阅读(877) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-06-30 19:24 nick_huang 阅读(868) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-06-30 16:25 nick_huang 阅读(621) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-06-30 16:23 nick_huang 阅读(436) 评论(0) 推荐(0) 编辑
摘要: package No01_获取模板并直接输出; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStreamWriter; import java.io.Writer; import freemarker.template.Configuration; import freemarker... 阅读全文
posted @ 2015-06-30 16:21 nick_huang 阅读(1764) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-06-29 23:11 nick_huang 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-06-29 23:10 nick_huang 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-06-29 23:09 nick_huang 阅读(192) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页