1. 程式人生 > >sql中建標量值函式

sql中建標量值函式

1. USE [AirDB_YiZhuang]

    GO

2.CREATE FUNCTION co2iaqi (@val float)
RETURNS int
AS
BEGIN
-- Declare the return variable here
DECLARE @iaqi int


-- Add the T-SQL statements to compute the return value here
--SELECT <@ResultVar, sysname, @Result> = <@Param1, sysname, @p1>


-- Return the result of the function
RETURN @iaqi


END
GO