Adding Column with Default value

Last Post 26 Jul 2004 04:55 AM by Shafiq. 0 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Shafiq
New Member
New Member

--
26 Jul 2004 04:55 AM
Hi,

I have setup merge replication. Now I want to add two more columns with default value of ''. Does the following code will work?

sp_repladdcolumn
@source_object = 'Header',
@column = 'PROVINC',
@typetext = 'char(5) NOT NULL DEFAULT ''' ,
@publication_to_add = 'MyPub',
@force_invalidate_snapshot = 0
@force_reinit_subscription = 0

sp_repladdcolumn
@source_object = 'Header',
@column = 'INTERFL',
@typetext = 'char(1) NOT NULL DEFAULT ''' ,
@publication_to_add = 'MyPub',
@force_invalidate_snapshot = 1
@force_reinit_subscription = 1

I want to reinialize only when both the columns have been added.

Thanks
Shafiq
You are not authorized to post a reply.

Acceptable Use Policy