- 博客(21)
- 收藏
- 关注
原创 MySql快速生成insert 语句
用于替代手写insert语句生成后自行编辑所需要的字段即可-- python版占位符SELECT CONCAT( 'insert into ', table_name, '(', GROUP_CONCAT( COLUMN_NAME ), ') value (', GROUP_CONCAT( '%s' ), ')' ) FROM information_schema.COLUMNS WHERE table_schema = 'your database' AN
2022-04-15 12:18:30
4667
原创 oracle筛选一年周末日期并循环插入表中
DECLARE cursor days IS SELECTd FROM ( SELECT TRUNC( TO_DATE( '2021-11-1', 'YYYY-mm-dd' ) ) + ROWNUM - 1 AS d FROM dual CONNECT BY ROWNUM <= 430 ) td WHERE TO_CHAR( td.D, 'd' ) IN ( 1, 7 );BEGIN FOR dc IN days LOOP INSERT INTO "HOLIDAYS" VA.
2021-10-26 17:02:54
445
原创 Oracle数据库blob字段导出hex后再导入
通常blob字段导出的数据格式为十六进制hex,因此重新导入时需要将hex格式的数据进行转换。转换过程需要两步:1- HEXTORAW(hex_data);2- TO_BLOB(raw_data);同时blob数据通常较长,会报错PLS-00172: string literal too long,因此可写成过程以执行declarev_blobblob := TO_BLOB(HEXTORAW('//your hex '));BEGININSERT INTOtab...
2021-09-29 11:27:40
1133
原创 Ubuntu启动FastDFS Tracker报错error while loading shared libraries: libfastcommon.so
问题描述:Tracker启动时加载不到libfastcommon.so文件解决1:检查是否下载、安装libfastcommon。通过whereis libfastcommon.so查找文件2:安装后查看本机文件路径,添加软链ln -s /usr/lib64/libfastcommon.so /usr/local/lib/libfastcommon.soln -s /usr/lib64/libfastcommon.so /usr/lib/libfastcommon.soln -s /us
2021-09-29 10:58:12
1124
转载 Mysql字符串位置函数locate,可检测是否包含字符串
LOCATE(substr,str), LOCATE(substr,str,pos)The first syntax returns the position of the first occurrence of substring substr in string str. The second syntax returns the position of the first o
2015-12-01 11:02:56
938
转载 MySql,Trim函数使用
TRIM([{BOTH | LEADING | TRAILING} [remstr] FROM] str), TRIM([remstr FROM] str)Returns the string str with all remstr prefixes or suffixes removed. If none of the specifiers BOTH, LEADING,
2015-11-26 20:51:07
527
转载 LNMP相关软件安装目录
LNMP相关软件安装目录Nginx 目录: /usr/local/nginx/MySQL 目录 : /usr/local/mysql/MySQL数据库所在目录:/usr/local/mysql/var/MariaDB 目录 : /usr/local/mariadb/MariaDB数据库所在目录:/usr/local/mariadb/var/PHP目录 : /usr/loca
2015-11-13 20:53:45
285
原创 DISCUZ,数据库批量禁言
update ****common_member t set t.groupid = 4 where clause;
2015-10-17 14:58:15
840
原创 汉字转拼音首字母
public class PinyinHelper { /// /// 汉字拼音首字母列表 本列表包含了20901个汉字,用于配合 GetChineseSpell 函数使用,本表收录的字符的Unicode编码范围为19968至40869[南京 yyf] /// private static string[] strC
2015-01-22 10:08:21
135063
原创 JsonHelper
public static class JsonHelper { public static T parse(string jsonString) { using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(jsonString))) {
2015-01-21 22:56:01
408
原创 OpenSMTP,解决中文名称附件不能发送的问题
/// /// Encode the file for inclusion as a mime attachment. /// The boundaries are not provided. /// /// public String ToMime() {
2014-06-23 19:59:36
508
转载 C#,利用反射获取私有成员或属性
public static T GetPrivateProperty(this object instance, string propertyname) { BindingFlags flag = BindingFlags.Instance | BindingFlags.NonPublic; Type type = instance
2014-05-28 19:51:57
1009
原创 [SQL]递归查询
SELECT DISTINCT T.NODEVALUEID FROM Table_TREE T START WITH T.NODEID = '{0}' CONNECT BY PRIOR T.NODEID = T.PARENTNODEID
2014-05-27 08:59:11
333
翻译 List<T>去除重复对象
list = list.GroupBy(x => x.mobile).Select(grp => grp.First()).ToList();
2014-05-14 18:17:43
1181
原创 [SQL]Oracle,SqlServer,根据表名获取主键列名
Oracle:@"select col.column_name , con.table_namefrom all_constraints con, all_cons_columns col where con.constraint_name = col.constraint_name and con.constraint_type='P' and upper(con.tabl
2013-07-31 11:09:38
927
原创 最近喜欢用的颜色
一种浅蓝,像极了秋季天空的颜色一种接近于紫色的蓝,让我联想到霞光下平静的大海{Name=GradientActiveCaption, ARGB=(255, 166, 202, 240)}{Name=RoyalBlue, ARGB=(255, 65, 105, 225)}
2013-06-28 12:29:29
390
原创 流与Image对象的转换
序列化: /// /// 将Image数据转换为byte数组 /// /// /// public static byte[] ImageToObject(System.Drawing.Image pImage) { if (pImage == n
2013-06-03 10:07:45
740
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人