摘要:
写很复杂的存储过程也许效率可能是高一点,但是很复杂,下面是很简单但效率也不错的分页方法: set @ = 'select * from (select Top ' + cast(@Size as varchar(100)) + ' * from (select Top ' + cast((@Page * @Size) as varchar(100)) + ' * from produ... 阅读全文
摘要:
// ==++==// // // Copyright (c) 2002 Microsoft Corporation. All rights reserved.// // The use and distribution terms for this software are contained in the file// named license.txt, whic... 阅读全文
摘要:
1按类别合并字符串把相同类别的内容按类别合并到一起,见后面的例: CREATE function f_str(@id int)returns varchar(8000)asbegin declare @ varchar(8000) set @='' select @=@+','+rtrim(PHONE) from A where id=@id return(stuff(@,1,1,''))end ... 阅读全文