摘要: 一个输入框,只可以输入数字或者小数点,其他字符不显示; 整数部分最多输入三位; 小数部分最多输入一位。 代码: /script 只能输入数字,且范围在0.0~999.9之间,小数只能输入一位,整数最多3位,允许没有小数。 阅读全文
posted @ 2011-01-19 12:00 mylhei 阅读(2752) 评论(0) 推荐(1) 编辑
摘要: 用来显示2个数据库中具有不同表名的表的信息以及具有相同表的表结构不同的信息。[代码] 阅读全文
posted @ 2010-12-01 10:51 mylhei 阅读(387) 评论(0) 推荐(0) 编辑
摘要: with l0 as (select 1 as C union all select 1 as C),--2-1 l1 as (select 1 as C from l0 as A,l0 as B),... 阅读全文
posted @ 2010-11-09 11:23 mylhei 阅读(915) 评论(0) 推荐(1) 编辑
摘要: exec sp_databases--列出数据库 exec sp_server_info-- exec sp_stored_procedures--环境中的存储过程列表 exec sp_tables--所有可以成为select对象的列表 exec sp_password @new='newpassword',@loginame ='sa'--更改登录密码   use master; ... 阅读全文
posted @ 2010-11-09 11:14 mylhei 阅读(316) 评论(0) 推荐(0) 编辑
摘要: Result: 阅读全文
posted @ 2010-10-27 10:55 mylhei 阅读(456) 评论(0) 推荐(0) 编辑
摘要: create table #temp ( dbname nvarchar(50))declare @xname nvarchar(50)declare @rowCount intdeclare mycur cursor for select name from sys.databases where owner_sid <> 0x01open mycurfetch next from ... 阅读全文
posted @ 2010-10-26 13:47 mylhei 阅读(431) 评论(0) 推荐(2) 编辑
摘要: 清除表:truncate table 【tablename】; 建立存储过程: create proc procname as .. go 建立游标: declare cursorName cursor for sqlsentence --定义游标 open cursorName--打开游标 fetch next from cursorName into --执行查询 close... 阅读全文
posted @ 2010-08-19 00:52 mylhei 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 比如: 在一个asp.net页面使用window.showModalDialog()打开新窗口b.aspx 可以写成var ret = window.showModalDialog(“b.aspx”,'_self','scrolling:no;resizable:no;status:no;dialogWidth:550px;dialogHeight:450px;center:1'); ... 阅读全文
posted @ 2010-07-26 18:05 mylhei 阅读(550) 评论(1) 推荐(0) 编辑
摘要: 首先画一个验证码,这个很简单吧。贴下代码imageValidate.aspxprotected void Page_Load(object sender, EventArgs e) { //生成4位的验证码 CreateCheckCodeImage(GenerateCheckCode()); } private string GenerateCheckCode() { int number; ch... 阅读全文
posted @ 2010-07-08 00:34 mylhei 阅读(576) 评论(1) 推荐(0) 编辑
摘要: --创建测试表 [CREATE] TABLE t1(ID int IDENTITY,A int) GO --插入记录 INSERT t1 VALUES(1) GO --1. 将IDENTITY(标识)列变为普通列 [ALTER] TABLE t1 ADD ID_temp int GO UPDATE t1 SET ID_temp=ID [ALTER] TABLE t1 DROP COLUMN ID ... 阅读全文
posted @ 2010-07-07 00:39 mylhei 阅读(399) 评论(0) 推荐(0) 编辑