sqlserver 创建字符串函数

SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO


create    function   getQyg(@id int)
  returns  varchar(30)
  as    
  begin  
   declare   @ch   as   varchar(30)  
   select  @ch = cname from dbo.routing where country_id = @id
 return @ch
  end 

 

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

 

你可能感兴趣的:(sqlserver)