摘要: --查询所有表及注释SELECTA.name ,C.valueFROM sys.tables A LEFT JOIN sys.extended_properties C ON C.major_id = A.object_idWHERE C.minor_id=0 group by A.name ,C. 阅读全文
posted @ 2018-09-25 16:34 王子先生 阅读(4668) 评论(0) 推荐(0) 编辑
摘要: DROP procedure Sel_Function_ActivityPastDueDELIMITER $$DROP procedure IF EXISTS`shouyi`.`Sel_Function_ActivityPastDue` $$create procedure `shouyi`.`Se 阅读全文
posted @ 2018-09-20 00:50 王子先生 阅读(1521) 评论(0) 推荐(0) 编辑
摘要: DELIMITER $$DROP FUNCTION IF EXISTS `shouy`.`Sel_FUNC_GOODS_type` $$ CREATE FUNCTION `shouy`.`Sel_FUNC_GOODS_type` (TypeID int) RETURNS VARCHAR(100) b 阅读全文
posted @ 2018-07-12 11:42 王子先生 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1、新建一个类库解决方案 CommnoLog 2、新建两个文件夹 2.1FileUtil.cs 代码如下 public static class FileUtil { /// <summary> /// 追加内容到指定文件中 /// </summary> /// <param name="fileP 阅读全文
posted @ 2018-03-31 18:08 王子先生 阅读(1042) 评论(0) 推荐(0) 编辑
摘要: 下面使用标量值函数判断 出现重复的个数 create function fn_str_times(@str varchar(1000),--原子符串@indexstr varchar(20)--查找的字符)returns intasbegindeclare @findlen intdeclare @ 阅读全文
posted @ 2018-02-02 18:32 王子先生 阅读(435) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Windows.Forms; namespace ListZZB 阅读全文
posted @ 2018-01-09 09:43 王子先生 阅读(2067) 评论(0) 推荐(0) 编辑
摘要: delete from tb where id=1 删除数据 truncate table tb where id=1 第一种 自增长id不会删除,第二种会删除 阅读全文
posted @ 2017-11-12 19:36 王子先生 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 因为加密个解密都需要用到key所有在加密的后需要把key和加密码都存到数据库中 /// <summary> /// 唯一加密方式 /// </summary> /// <param name="texts"></param> /// <returns></returns> public static 阅读全文
posted @ 2017-11-06 16:09 王子先生 阅读(11911) 评论(3) 推荐(1) 编辑
摘要: select * from Client where CONVERT(varchar(100), Cli_Datetime, 23) ='2017-11-06' 在查询之前要对表中datetime类型的时间字段要进行转换才能查;datetime默认的类型是1900-01-01 00:00:00.00 阅读全文
posted @ 2017-11-06 15:56 王子先生 阅读(3464) 评论(0) 推荐(0) 编辑
摘要: select CONVERT(varchar, getdate(),8 ) --获取当前时间时分14:13:59 select CONVERT(varchar, getdate(),23 ) -获取年月 2017-07-01 select CONVERT(varchar, getdate(),12 阅读全文
posted @ 2017-07-01 14:50 王子先生 阅读(550) 评论(0) 推荐(0) 编辑