Exemplo n.º 1
0
 internal void GeneraSql(CSourceWriter sw)
 {
     sw.WriteLn(string.Format("alter table dbo.{0} add constraint {1} foreign key(", this.tableSource.Name, this.Name));
     sw.AddTab();
     sw.WriteCommaStringList(this.lFieldSource);
     sw.DelTab();
     sw.WriteLn(") references dbo." + this.tableDestination + " (");
     sw.AddTab();
     sw.WriteCommaStringList(this.lFieldDestination);
     sw.DelTab();
     sw.WriteLn(")");
     sw.WriteLn("GO");
 }