select * from 数据库1.dbo.表1 union all select * from 数据库2.dbo.表2
select COL1,COL2.... from 数据库1.dbo.表1 union all select COL1,COL2.... from 数据库2.dbo.表2
select * from 数据库1.dbo.表1 union all select * from 数据库2.dbo.表2
DataTable a = new DataTable(); string sql = "select ..."; NewStuConn = new SqlConnection(sel); NewStusqlda = new SqlDataAdapter(sql, NewStuConn); NewSqlCommand = new SqlCommand(sql); NewStusqlda.Fill(a);这点应该怎么写??
select * from 数据库1.dbo.表1
union all
select * from 数据库2.dbo.表2
union all
select COL1,COL2.... from 数据库2.dbo.表2
union all
select * from 数据库2.dbo.表2
DataTable a = new DataTable();
string sql = "select ...";
NewStuConn = new SqlConnection(sel);
NewStusqlda = new SqlDataAdapter(sql, NewStuConn);
NewSqlCommand = new SqlCommand(sql);
NewStusqlda.Fill(a);这点应该怎么写??