摘要: 上一节讲的是直接在创建表的时候添加条件约束,但是有时候是在表格创建完毕之后,再添加条件约束的,那么这个又该如何实现? 其实,跟上一节所写的SQL代码,很多是相同的,只是使用了修改表的ALTER关键字及添加约束的ADD CONSTRAINT关键字而已,其他大同小异。 代码如下: 结果: 阅读全文
posted @ 2016-06-14 22:39 cnxy 阅读(7003) 评论(0) 推荐(2) 编辑
摘要: 约束条件分为以下几种: 1)非空约束,使用NOT NULL关键字; 2)默认值约束,使用DEFAULT关键字; 3)检查约束,使用CHECK关键字; 4)唯一约束,使用UNIQUE关键字; 5)主键约束,使用PRIMARY KEY关键字; 6)外键约束,使用FOREIGN KEY关键字。 约束是确保 阅读全文
posted @ 2016-06-14 22:05 cnxy 阅读(7087) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace ConsoleApplication 8 { 9 class Program10 {11 static void Main(string[] args) //客户端12 {13 Heater t = new Heater(); //初始化Hea... 阅读全文
posted @ 2014-03-11 10:09 cnxy 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace Test 7 { 8 class Start 9 {10 public static void Main()11 {12 Tool.Fan fan = new Tool.Fan();13 fan.Rotating += new Tool.RotatingEventHander(fan... 阅读全文
posted @ 2014-01-14 19:54 cnxy 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace ConsoleApplication15 7 { 8 class Program 9 { 10 static void Main(string[] args) 11 { 12 Monitor m = new Monitor(); 13 m.PropertyChang... 阅读全文
posted @ 2013-12-20 18:31 cnxy 阅读(1656) 评论(0) 推荐(0) 编辑
摘要: //注意:请使用VS2010打开以下的源代码。//源代码地址:http://pan.baidu.com/s/1j9WVRusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.OleDb;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace WindowsFormsApplication22{ ... 阅读全文
posted @ 2013-11-24 22:31 cnxy 阅读(1058) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication13{ class Program { static void Main(string[] args) { Test t = new Test("Age",16); t.Run(); t.SetT1Value = "Height"; t.SetT2Va... 阅读全文
posted @ 2013-11-20 22:52 cnxy 阅读(494) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace ConsoleApplication11{ class Program { public delegate void TestDeleagte(string temp); static void Main(string[] args) { Thread t = new Thread(() =>... 阅读全文
posted @ 2013-11-20 20:55 cnxy 阅读(356) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading; 6 7 namespace ConsoleApplication9 8 { 9 class Program10 {11 static void Main(string[] args)12 {13 14 15 // 异步调用 16 // 将需传递给异步执行方法数... 阅读全文
posted @ 2013-11-19 20:40 cnxy 阅读(439) 评论(0) 推荐(0) 编辑
摘要: 源文件地址:http://pan.baidu.com/share/link?shareid=2536126078&uk=1761850335创建如图所示的控件:源代码: usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Runtime.InteropServices;namespa 阅读全文
posted @ 2013-11-09 15:35 cnxy 阅读(3565) 评论(0) 推荐(1) 编辑
著作版权归 cnxy.me 所有