_대문 | 방명록 | 최근글 | 홈피소개 | 주인놈
FrontPage › SP매개변수데이터타입알아내기

Contents

[-]


--SP 매개변수 데이터 타입 알아내기
create proc usp_get_sp_parameter @sp_name nvarchar(255) 
as
select @sp_name sp_name, '' name, '' column_name
union all
select '', a.name as column_name,
          b.name +  
         case when b.status = 2  then '(' + convert(varchar(10),a.length) + ')'
                   when a.xtype in (106,108) then '(' + convert(varchar(10),a.xprec) + ',' +  convert(varchar(10),a.xscale) + ')'
                   else '' end  as type
from syscolumns a,systypes b 
where a.id = object_id(@sp_name)
and a.xtype = b.xtype
go

--drop proc usp_get_sp_parameter

댓글 남기기..
이름: : 오른쪽의 새로고침을 클릭해 주세요. 새로고침
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:54

사랑한다는 것은 둘이 마주보는 것이 아니라 함께 같은 방향을 바라보는 것이다. (생떽쥐베리)