摘要: 数据库(字符串函数,日期函数,数据类型转换CAST,convert)use studentgocreate table yuangong(code int,name varchar(20),sex varchar(20),age int,bumen varchar(20),)insert into ... 阅读全文
posted @ 2014-11-02 16:54 安定祥和 阅读(10245) 评论(0) 推荐(0) 编辑
摘要: 数据库函数聚合函数(统计函数)Select AVG(age) as 年龄 from biao where banji=’一班’--直接出平均值,赋值给列名 年龄。注意as位置在from前. AVG只可以对数字类型操作。Select COUNT(*) from biao where name like... 阅读全文
posted @ 2014-10-31 16:53 安定祥和 阅读(2411) 评论(0) 推荐(0) 编辑
摘要: Create database second --创建数据库secondGoCreate table second1(Code int ,Name varchar(20) not null,--此时表示不能是 空!Price decimal(18,2) ,)Insert into second1 v... 阅读全文
posted @ 2014-10-30 23:06 安定祥和 阅读(542) 评论(0) 推荐(0) 编辑
摘要: xxx.mdf 数据库文件,有且只有一个!xxxlog.ldf 表示产生 日志并记录 ,至少有一个!复制数据库:复制xxx.mdf 和xxxlog.ldf即可!查找找数据库文件:1、 2、然后打开DAtA,找到相应名字的.mdf和.ldf文件.在搜索条中输入cmd然后回车,进入... 阅读全文
posted @ 2014-10-30 22:33 安定祥和 阅读(138) 评论(0) 推荐(0) 编辑
摘要: namespace ConsoleApplication91024hanshu{ class hanshua { //private只在当前class使用,需要初始化再使用! //public公共的,可以在整个命名空间namespace使用,使用时 要初始化! //static 的访问范围静态的,不... 阅读全文
posted @ 2014-10-27 08:27 安定祥和 阅读(301) 评论(0) 推荐(0) 编辑
摘要: public struct xxx(在class下,在static void Main上) class Program { // 位卑未敢忘忧国! //晓说(高晓松视频) public struct jiegouti // 创建 变量 中 项 的类型 { //public 表示是通用的!cla... 阅读全文
posted @ 2014-10-26 17:05 安定祥和 阅读(292) 评论(0) 推荐(0) 编辑
摘要: /* // 集合 Stack 没有索引!"好比是死胡同" Stack s=new Stack (); //特殊集合 堆!先进后出,后进先出! s.Push("1"); //赋值内容 要用 “” s.Push("2"); s.Push("3"); s.Push("4"); s.Push("5");... 阅读全文
posted @ 2014-10-23 13:26 安定祥和 阅读(382) 评论(0) 推荐(0) 编辑
摘要: //集合是一个类,需要添加引用 system.collections ArrayList h = new ArrayList();//集合索引也是从0开始! int i=h.Add(3); //返回的int值,是添加数据在集合中的索引! int k = h.Add(4); int t = h.Add... 阅读全文
posted @ 2014-10-21 16:48 安定祥和 阅读(211) 评论(0) 推荐(0) 编辑
摘要: //数组! // int[] shuzu = new int[6] { 1, 2, 3, 4, 5, 6 };//索引是从0开始。[]内表示数组包含的数值 个数! // int i = shuzu[2];//此处2 表示数组shuzu的索引!这是引用数组的格式! /* int[] shuzu =... 阅读全文
posted @ 2014-10-20 16:53 安定祥和 阅读(261) 评论(0) 推荐(0) 编辑
摘要: //double d = double.Parse(Console.ReadLine()); //d = Math.PI;//圆周率 //d = Math.Sqrt(d);//开方 //d = Math.Ceiling(d);//当为整数取整,当小数点后大于0,取上限加1进位取整. //d = M... 阅读全文
posted @ 2014-10-20 13:45 安定祥和 阅读(235) 评论(0) 推荐(0) 编辑