-(id)performSelector:(SEL)aSelectorDescription[说明]Sends a specified message to the receiver and returns the result of the message. (required)[发送指定消息的接...
分类:
其他好文 时间:
2014-10-10 13:29:34
阅读次数:
288
创建自定义函数:use 数据库名gocreate function 函数名(@pno int)returns intasbegin declare @a int if not exists(select * from person where pno=@pno) set @a=-1 else set...
分类:
其他好文 时间:
2014-10-09 21:49:17
阅读次数:
187
create function f_myWord(@s varchar(50))returns varchar(50) asbegindeclare @i intset @i=1while @i=1 BEGIN INSERT @TEMP_Table VALUES(left(@Sour...
分类:
数据库 时间:
2014-10-09 01:00:07
阅读次数:
342
set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgoALTER FUNCTION [dbo].[ufn_getDateOfWeek](@Date Datetime)RETURNS nchar(1)ASBEGIN DECLARE @returnValue nchar(...
分类:
数据库 时间:
2014-10-06 23:57:10
阅读次数:
178
ufn_GetWeekFirstAndEndDay 获取指定日期所在星期的第一天和最后一天日期ALTER FUNCTION [dbo].[ufn_GetWeekFirstAndEndDay](@tmpDate DATETIME)RETURNS @tmpTable TABLE( FirstDay D....
分类:
数据库 时间:
2014-10-06 22:28:00
阅读次数:
214
To deal cards, we would like a method that removes a card from the deck and returns it. The list method pop provides a convenient way to do that. Sinc...
分类:
其他好文 时间:
2014-10-06 19:13:50
阅读次数:
201
--函数声明create function myAdd(@a int, @b int)returns intas begindeclare @c intset @c = @a + @breturn @cend --函数调用declare @a1 intdeclare @b1 int declare ...
分类:
数据库 时间:
2014-10-06 02:00:09
阅读次数:
206
--创建表值函数create function GetClassMember(@className nvarchar(50))returns tableasreturn(select * from Students where ClassName=@className)go--调用表值函数selec...
分类:
数据库 时间:
2014-10-06 01:20:29
阅读次数:
264
Math.Round(45.367,2) //Returns 45.37Math.Round(45.365,2) //Returns 45.36C#中的Round()不是我们中国人理解的四舍五入,是老外的四舍五入,是符合IEEE标准的四舍五入,具体是四舍六入,下面的才是符合中国人理解的四舍五入M.....
分类:
其他好文 时间:
2014-09-30 20:08:59
阅读次数:
152
--1、借助newid()
go
--创建视图(因为在函数中无法直接使用newid())
create view vnewid
as
select newid() N'MacoId';
go
--创建函数
create function getrandstr(@n int)
returns varchar(max)
as
begin
decla...
分类:
数据库 时间:
2014-09-30 15:47:09
阅读次数:
259