标签:style blog io color ar sp div on log
CREATE function [dbo].[f_testFunc]( @v_id nvarchar(4000) ,@v_type nvarchar(4000) ) returns NVARCHAR(4000) as begin declare @str_res NVARCHAR(4000); declare @str_id NVARCHAR(4000); declare @str_code NVARCHAR(4000); declare @str_name NVARCHAR(4000); SELECT @str_id = a.id,@str_code = a.event_code,@str_name = a.event_name FROM app_event a WHERE a.id = @v_id; IF(@v_type=‘id‘) RETURN @str_id IF(@v_type=‘code‘) RETURN @str_code IF(@v_type=‘name‘) RETURN @str_name return @str_name; end GO
标签:style blog io color ar sp div on log
原文地址:http://www.cnblogs.com/winkey4986/p/4092876.html