给sqlserver表手动加注释(说明)
摘要:开发中有时会用代码生成器来生成一些代码,这时会取数据库中的表注释和列注释拿过来当做代码的model类和属性做注释。sqlserver中给列加注释(说明)很简单。如果手动加表的说明: 右键属性 扩展属性 名称指定特定名称:MS_Description 这就是注释了
阅读全文
posted @
2012-11-07 16:08
阿蛆
阅读(1193)
推荐(0)
<a>标签内嵌<input type="image">在IE中链接失效问题
摘要:input type属性有个值是"image" .有时候用这个标签,利用它默认的样式可以很方便的达到我们想要的表现效果。但是如果这个这个标签放在标签中会使链接在IE浏览器中失效。原因是input image表单元素其实相当于submit,在点击它的时候会触发表单提交事件,如果有form表单,那么会提交,如果没有,会根据外层的a标签跳转,但是在IE中会失效。解决方案,用js取消按钮的submit 或者 用或其它html标签代替。
阅读全文
posted @
2012-11-06 18:58
阿蛆
阅读(421)
推荐(0)
jquery 关于table的子标签tbody
摘要:12上面是一段很简单的html代码,工作中用到了这样一个table1我想通过jquery动态操作tbody的html();然后我写了这样的代码:1 var html = "我是tbody";2 3 $("table tbody").html(html);然后我发现页面变成了我是tbody经过一番测试,发现用js获取table下tbody 通过table下的子元素tbody这种方式不一定会得到我们想要的结果。因为 table标签 默认会有一个tbody 这个tbody就是table下面所有的tr。所以当我们在table下没有写tbody或者thead的时候
阅读全文
posted @
2012-06-15 13:48
阿蛆
阅读(2209)
推荐(0)
mssql FOR XML方法多行合并为一条数据
摘要:实验室表:LaboratoryRoom标签表:Tag关系表:Lab_Tagselect lab.Name,STUFF( ( SELECT ',' + isnull(TagName,'') FROM Tag WHERE Id in (select TagId from Lab_Tag where LabId = lab.Id) FOR XML PATH('') ), 1, 1, '') as tags from dbo.LaboratoryRoom as labstuff函数用于去掉多余的逗号stuff函数用法:select STU
阅读全文
posted @
2012-04-25 21:14
阿蛆
阅读(457)
推荐(0)
sqlserver 插入多行数据
摘要:insert into t (f) select f1 union select f2 union select f3 多值插入select xxx into t2 from t1update t1 set xx = (select xx from t2 where id=t1.id)
阅读全文
posted @
2012-04-21 00:38
阿蛆
阅读(867)
推荐(0)
调用系统存储过程清空所有表
摘要:调用系统存储过程清空所有表 EXECUTE sp_msforeachtable 'truncate table ?'
阅读全文
posted @
2012-04-21 00:27
阿蛆
阅读(152)
推荐(0)
panel防闪
摘要:SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor, true);
阅读全文
posted @
2012-04-17 14:26
阿蛆
阅读(127)
推荐(0)
SQL 表变量用法
摘要:标量变量如:@var1 int = null表变量的声明DECLARE @My_Table (id int)用法插入表A数据返回ID,一般有两种方法 @@identity或者inserted.id把这个ID放入表变量@My_Tableinsert into A (Name,Gender) output inserted.id into @My_Table values ('Name','时男时女')declare @My_id int set @My_id= (select id from @My_Table)
阅读全文
posted @
2011-08-02 11:29
阿蛆
阅读(485)
推荐(0)