摘要:
1 IF EXISTS(SELECT 1 FROM sysobjects WHERE [name] = 'GetAge') 2 DROP FUNCTION dbo.GetAge 3 go 4 CREATE FUNCTION dbo.GetAge 5 ( 6 @birthday DATETIME 7 ) 8 RETURNS INT 9 AS10 BEGIN11 IF(@birthday IS NOT NULL AND ISDATE(@birthday) = 1)12 BEGIN13 DECLARE @age INT , @y IN... 阅读全文