关于和并列的 要这种效果. create table tb(idint, value varchar(10)) insert into tbvalues(1,'aa') insert into tbvalues(1,'bb') insert into tbvalues(2,'aaa') insert into tbvalues(2,'bbb') insert into tbvalues(2,'ccc') go /* stuff(param1, startIndex, length…
Sql Server 函数的操作实例!(执行多条语句,返回Select查询后的临时表) SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= CREATE FUNCTION csj_csj(@id as int) RETURNS @temp table --这里返回一个自己创建的表,里面的字段根据自己的需要设 ( [id] int, [zd] varcha…
Sql Server 函数的操作实例!(返回一条Select语句查询后的临时表) SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE FUNCTION dbo.csjcsj() RETURNS TABLE AS RETURN ( SELECT * from xx ) GO 这是创建代码,执行代码如下: select * from csjcsj() 当然,也可以传参数!…