dbTalk Databases Forums  

Alter command in SP

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss Alter command in SP in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rogers
 
Posts: n/a

Default Alter command in SP - 01-12-2007 , 09:06 AM






Can I Alter any of the table through stored procedure. I tried but it didn't
work, if any one guide then I would really appreciated.

Thanks



Reply With Quote
  #2  
Old   
Hari Prasad
 
Posts: n/a

Default RE: Alter command in SP - 01-12-2007 , 05:15 PM






It works good for me in SQL 2000 and SQL 2005. See the sample below.

create table xx( i int)
go
create proc xproc
as
Begin
alter table xx add j int
End
go
exec xproc
go
select * from xx

Thanks
Hari

"Rogers" wrote:

Quote:
Can I Alter any of the table through stored procedure. I tried but it didn't
work, if any one guide then I would really appreciated.

Thanks




Reply With Quote
  #3  
Old   
Rogers
 
Posts: n/a

Default Re: Alter command in SP - 01-15-2007 , 12:28 PM



Thanks Hari, can you try this one. It wont work from my side.

create table xx( i int)
go
create proc xproc
as
Begin
alter table xx add j int
End
select * from xx where j is null
go

exec xproc
go
select * from xx


"Hari Prasad" <HariPrasad (AT) discussions (DOT) microsoft.com> wrote

Quote:
It works good for me in SQL 2000 and SQL 2005. See the sample below.

create table xx( i int)
go
create proc xproc
as
Begin
alter table xx add j int
End
go
exec xproc
go
select * from xx

Thanks
Hari

"Rogers" wrote:

Can I Alter any of the table through stored procedure. I tried but it
didn't
work, if any one guide then I would really appreciated.

Thanks






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.