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()
当然,也可以传参数!
2022-09-20 20:42:38
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()
当然,也可以传参数!