반응형
/********************************************************************************************
-- Title : [2k5] 프로시저 그룹화
-- Reference : blog.naver.com/danbee99
-- Key word : 프로시저 그룹화 procedure grouping
********************************************************************************************/
-- 이걸 대체 어떻게 어디다 쓰라꼬...ㅡ.ㅡ''''''

drop table ttt;

create table ttt
(a int not null identity
, b int
);

insert into ttt values (9);
insert into ttt values (9);
insert into ttt values (9);

select * from ttt;
go

create proc up_ttt;1
as
select * from ttt where a = 1;
go

create proc up_ttt;2
as
select * from ttt where a = 2;
go

exec up_ttt;1;
exec up_ttt;2;
go

select * from sys.procedures;
/*
name   object_id
------ ---------
up_ttt 149575571
*/
go

sp_helptext 'up_ttt';
/*
create proc up_ttt;1 
as 
select * from ttt where a = 1; 
create proc up_ttt;2 
as 
select * from ttt where a = 2; 
*/
go

drop proc up_ttt;
go

반응형

+ Recent posts