摘要: 1 DELETE删除多表数据,怎样才能同时删除多个关联表的数据呢?这里做了深入的解释: 2 3 1、 delete from t1 where 条件 4 5 2、delete t1 from t1 where 条件 6 7 3、 delete t1 from t1,t2 where 条件 8 9 4、delete t1,t2 from t1,t2 where 条件 10... 阅读全文
posted @ 2017-07-31 17:22 温故余学 阅读(33893) 评论(0) 推荐(3) 编辑
摘要: System.Threading.Timer 是一个简单的轻量计时器,它使用回调方法并由线程池线程提供服务。不建议将其用于Windows 窗体,因为其回调不在用户界面线程上进行。System.Windows.Forms.Timer 是用于Windows 窗体的更佳选择。要获取基于服务器的计时器功能, 阅读全文
posted @ 2017-07-25 16:47 温故余学 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 1 USE [Test] 2 GO 3 /****** Object: Trigger [dbo].[shipment_mstInsert] Script Date: 2017/6/22 19:11:16 ******/ 4 SET ANSI_NULLS ON 5 GO 6 SET QUOTED_IDENTIFIER ON 7 GO 8 ALTER TRI... 阅读全文
posted @ 2017-06-23 17:31 温故余学 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 1 USE [Test] 2 GO 3 /****** Object: Trigger [dbo].[DBpoitem_mstIup] Script Date: 2017/6/1 9:35:41 ******/ 4 SET ANSI_NULLS ON 5 GO 6 SET QUOTED_IDENTIFIER ON 7 GO 8 9 ALTER TRI... 阅读全文
posted @ 2017-06-01 10:57 温故余学 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 1 老大------drop 2 3 出没场合:drop table tb --tb表示数据表的名字,下同 4 5 绝招:删除内容和定义,释放空间。简单来说就是把整个表去掉.以后要新增数据是不可能的,除非新增一个表, 6 7 例如:一个班就是一个表,学生就是表中的数据,学生的职务就是定义 8 9 drop table class,就是把整个... 阅读全文
posted @ 2017-04-20 17:24 温故余学 阅读(2399) 评论(0) 推荐(0) 编辑
摘要: //冒泡排序法 static void BubbleSort(int[] w) { int hang=w.Length ; int temp; for(int i=0;i w[j]) { ... 阅读全文
posted @ 2017-02-22 17:10 温故余学 阅读(386) 评论(0) 推荐(0) 编辑
摘要: int max=0; //初始化最大值,默认为0 int min=9; //初始化最小值,默认为9 int a=5; int b=7; int c=4; int d=9; int[] intArr={a,b,c,d}; foreach(int tempint in intArr) { if(maxtempint) {min=tempint;} } //for(int i=0;i... 阅读全文
posted @ 2017-02-21 09:11 温故余学 阅读(1875) 评论(0) 推荐(0) 编辑
摘要: 1、环境 数据库为Sql Server2008。 表(Course)结构为: No Char(10) Primary Key Name Varchar(20) Comment Varchar(50) 2、存储过程 就以插入数据为例,其他的可以照着写就行了。 编程语言都有异常的捕获与处理, 在 SqlServer2008 中也是这样子的。 对会出现异常的语句加上 begin try……end tr... 阅读全文
posted @ 2017-02-17 17:12 温故余学 阅读(757) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 5 6 正则表单验证 7 48 49 50 51 52 53 用户名: 54 55 用户名长度在20个字符... 阅读全文
posted @ 2016-11-14 15:51 温故余学 阅读(4158) 评论(0) 推荐(0) 编辑
摘要: 1 SELECT WorkerNo, DutyTime, DATENAME(weekday, DutyTime) AS WeekDay, CycleType, CycleNumber, YnOnDuty, 2 CASE WHEN YnOnDuty = 0 THEN '休息' ELSE RIGHT('0' + CAST((CASE WHEN (... 阅读全文
posted @ 2016-11-03 15:20 温故余学 阅读(1808) 评论(0) 推荐(0) 编辑