ReplicationTable.ReplicationDropColumn(String, String) 方法

定義

從一個或多個發行集中發行的資料表內移除資料行。

public:
 void ReplicationDropColumn(System::String ^ columnName, System::String ^ schemaChangeScript);
public void ReplicationDropColumn (string columnName, string schemaChangeScript);
member this.ReplicationDropColumn : string * string -> unit
Public Sub ReplicationDropColumn (columnName As String, schemaChangeScript As String)

參數

columnName
String

要移除之資料行的名稱。

schemaChangeScript
String

要傳播至訂閱者的結構描述變更指令碼。 這只有在交易式發行集和快照式發行集中才有效。 如果您不想指定這個參數,請使用 null 或空字串。

備註

這個方法支援回溯相容性。 在加入資料行或從已發行的資料表中移除資料行時,請使用架構變更複寫。 如需詳細資訊,請參閱對發行集資料庫進行結構描述變更

只有在發行集 ReplicationDropColumn 資料庫之 db_owner 固定資料庫角色的成員,才能在發行者端的系統管理員(sysadmin)固定伺服器角色成員呼叫方法。

呼叫 ReplicationDropColumn 相當於執行Sp_repldropcolumn (transact-sql)

適用於