随笔 - 109  文章 - 0  评论 - 32 
12 2009 档案
sql 触发器
摘要: CREATE TRIGGER [触发器名字] ON dbo.表名FOR INSERT,updateASdeclare @a number --成绩declare @id int --(假设你的表里有一个主键为id)select @a=成绩,@id=id from inserted --从将要插入(或更新)数据中读取这个字段的值,id是假设你的表中的主键,如果没有,你可以设一个(可用流水号),这个必...阅读全文
posted @ 2009-12-24 20:54 Myhsg 阅读(18) | 评论 (0) 编辑
分类方法 (转)
摘要: 数据仓库,数据库或者其它信息库中隐藏着许多可以为商业、科研等活动的决策提供所需要的知识。分类与预测是两种数据分析形式,它们可以用来抽取能够描述重要数据集合或预测未来数据趋势的模型。分类方法(Classification)用于预测数据对象的离散类别(Categorical Label);预测方法(Prediction )用于预测数据对象的连续取值。 分类技术在很多领域都有应用,例如可以通过客户分类构...阅读全文
posted @ 2009-12-18 22:21 Myhsg 阅读(47) | 评论 (0) 编辑
sql some any all用法(转)
摘要: 原文地址:http://hi.baidu.com/tz3638/blog/item/6ddde0dc373b67a5cc116645.htmlcreate table #A(id int)goinsert into #A s(1)insert into #A s(2)insert into #A s(3)insert into #A s(4)go--All:对所有数据都满足条件,整个条件才成立,例...阅读全文
posted @ 2009-12-17 22:37 Myhsg 阅读(168) | 评论 (0) 编辑
SQL查询中的转义字符(转)
摘要: 原文地址:http://blog.csdn.net/Adi_liu/archive/2007/12/06/1920606.aspx如果想查找“_cs”结尾的的账户select * from [user] where loginname like '%_cs'是不行的,_ 被认为是任意的字符,所以需要转义字符,有两种写法:select * from [user] where ...阅读全文
posted @ 2009-12-17 22:35 Myhsg 阅读(84) | 评论 (0) 编辑