上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: if exists(select * from sys.sysdatabases where [name] = 'DB_Student')drop database DB_Studentgocreate database DB_Studenton( name = DB_Student_mdf, filename = 'E:\DB_Student_mdf.mdf', size = 3mb, maxsize = 100mb, filegrowth=1mb)log on( name = DB_Student_ldf, filename = 'E:\DB_Stu 阅读全文
posted @ 2013-07-23 02:14 秋日的私语(且行且珍惜) 阅读(204) 评论(0) 推荐(0) 编辑
摘要: select top 1 with ties name,stuId,sex,score from stuInfo order by score desc 阅读全文
posted @ 2013-07-23 01:23 秋日的私语(且行且珍惜) 阅读(190) 评论(0) 推荐(0) 编辑
摘要: select distinct sex from stuInfo//查询不重复的select top 3 * from stuInfo//查询表的前三行select top 30 percent * from stuInfo//查询表的前边的百分之三十行select top 2 * from stuInfo order by NEWID() 阅读全文
posted @ 2013-07-23 01:16 秋日的私语(且行且珍惜) 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1、delete from table_Usergo2、truncate table table_Usergo这两种方法删除的结果一样,都是删除表中所有的数据,但是第二种方法删除得更快,使用的系统资源和事务日志资源更少。Delete :删除数据表中的行(可以删除某一行,也可以在不删除数据表的情况下删除所有行)。删除某一行:Delete from 数据表名称 where 列名称=值;删除所有行:Delete * from 数据表名称Drop :删除数据表或数据库,或删除数据表字段。删除数据库:drop database 数据库名称删除数据表:(表的结构、属性、索引也会被删除) use 数据库名称 阅读全文
posted @ 2013-07-23 00:49 秋日的私语(且行且珍惜) 阅读(4397) 评论(0) 推荐(1) 编辑
摘要: 1、insert into stuInfo(name,stuId) values('李洁','19291727')insert into stuInfo(name,stuId) values('李康','19291728')insert into stuInfo(name,stuId) values('何洁','19291729')insert into stuInfo(name,stuId) values('何宇','19291730')go2、insert int 阅读全文
posted @ 2013-07-23 00:40 秋日的私语(且行且珍惜) 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 全选一行的的属性是:SelectionMode = FullROwSelect; 阅读全文
posted @ 2013-07-22 12:08 秋日的私语(且行且珍惜) 阅读(117) 评论(0) 推荐(0) 编辑
摘要: UserInsert ui = new UserInsert(); ui.ShowDialog();//ui.DialogResult if (ui.DialogResult == DialogResult.OK) { SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=Test;Integrated Security=True"); conn.Open(); SqlDataAdapter da = new SqlDataAdapter("select id,name from 阅读全文
posted @ 2013-07-22 08:35 秋日的私语(且行且珍惜) 阅读(193) 评论(0) 推荐(0) 编辑
摘要: windows系统默认连接:Data Source=.;Initial Catalog=Test;Integrated Security=Truesqlserver验证连接:server=.;database=Test;uid=sa;pwd=123456 阅读全文
posted @ 2013-07-22 08:34 秋日的私语(且行且珍惜) 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 下边是实现的代码:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Text.RegularExpressions;namespace Registerting{ public partial class Form1 : Form { public Form1() { I 阅读全文
posted @ 2013-07-16 11:31 秋日的私语(且行且珍惜) 阅读(155) 评论(0) 推荐(0) 编辑
摘要: string reg = @"^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$"; 阅读全文
posted @ 2013-07-16 10:55 秋日的私语(且行且珍惜) 阅读(152) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 下一页