CREATE PROCEDURE dbo.tab_select
AS       
declare ID_cursor  cursor for 
select * from tab_user 
open ID_cursor 
begin 
if sex='1'
                  begin
   set sex='男'
  end
else
                  begin
    sex='女'
                  end
end 
close ID_cursor 
deallocate ID_cursor 
RETURN
GO
我在字段中有个sex,里有1和2二种字符,我想在显示的时候把1换成男,2换成女,功能就这么简单,谢谢大家了