Fight With Me!!!

导航

上一页 1 ··· 95 96 97 98 99 100 101 102 103 ··· 106 下一页

2014年12月28日 #

关于自定义函数的创建和调用

摘要: Create function AvgResult(@scode varchar(10))Returns realAsBegin Declare @avg real set @avg='1.2'; Return @avgEnd调用方法:select dbo.AvgResult('s000... 阅读全文

posted @ 2014-12-28 13:20 nickTimer 阅读(261) 评论(0) 推荐(0) 编辑

2014年12月27日 #

sqlserver注释

摘要: -- 单行注释/* 多行注释*/ 阅读全文

posted @ 2014-12-27 16:14 nickTimer 阅读(577) 评论(0) 推荐(0) 编辑

2014年12月26日 #

Java的String中的subString()方法

摘要: 方法如下: public String substring(int beginIndex, int endIndex) 第一个int为开始的索引,对应String数字中的开始位置, 第二个是截止的索引位置,对应String中的结束位置 1、取得的字符串长度为:endIndex - beginInde 阅读全文

posted @ 2014-12-26 10:53 nickTimer 阅读(350) 评论(0) 推荐(0) 编辑

2014年12月17日 #

解决为'*********' 的游标已存在问题

摘要: 出现名为'MM_CURSOR' 的游标已存在。一般出现这样的问题是:1:游标没有 --关闭 释放如:--关闭游标CLOSEMM_CURSOR--释放游标DEALLOCATEMM_CURSOR2:游标已存在同名情况,此时就需要在定义游标时申明一个局部的游标如:/*检索已经配置好的新村镇的所有乡级部门*... 阅读全文

posted @ 2014-12-17 10:55 nickTimer 阅读(567) 评论(0) 推荐(0) 编辑

2014年12月14日 #

删除触发器

摘要: create trigger goodsdelete on goods after delete as delete from orders where goodsname in (select name from deleted) 阅读全文

posted @ 2014-12-14 23:09 nickTimer 阅读(274) 评论(0) 推荐(0) 编辑

查看数据库已有触发器

摘要: select * from sysobjects where xtype='TR' 阅读全文

posted @ 2014-12-14 23:04 nickTimer 阅读(265) 评论(0) 推荐(0) 编辑

2014年12月12日 #

SQL SERVER 如果判断text类型数据不为空

摘要: 一个字段Remark的数据类型设置先设置为varcharr(255),后来考虑到扩展性需要将其定义为TEXT类型,但是SQL 语句报错。 SQL 语句: SELECT * FROM TABLE WHERE ISNULL(Remark,'')'' 报错信息:数据类型 text 和 varchar... 阅读全文

posted @ 2014-12-12 15:32 nickTimer 阅读(4484) 评论(0) 推荐(0) 编辑

2014年12月11日 #

sql server判断是否为null

摘要: sql server 替换null:isnull(arg,value) 如:select isnull(price,0.0) from orders ,如果price为null的话,用0.0替换 与null比较: is not null,is null 如 select * from ord... 阅读全文

posted @ 2014-12-11 13:22 nickTimer 阅读(4008) 评论(0) 推荐(1) 编辑

2014年12月9日 #

sqlserver列重命名

摘要: EXECsp_rename'tablename.[OldFieldName]','NewFieldName','COLUMN' 阅读全文

posted @ 2014-12-09 19:25 nickTimer 阅读(279) 评论(0) 推荐(0) 编辑

动态sql语句基本语法

摘要: 1 :普通SQL语句可以用Exec执行 eg: Select * from tableName Exec('select * from tableName') Exec sp_executesql N'select * from tableName' -- 请注意字符串前一定要加N 2:字段名,表... 阅读全文

posted @ 2014-12-09 18:58 nickTimer 阅读(167) 评论(0) 推荐(0) 编辑

上一页 1 ··· 95 96 97 98 99 100 101 102 103 ··· 106 下一页