大家看看这个sql如何写? 两个表查询的结果要合成一个如何写sqlselect id,name from table1select id,name form table2两个表,table1和table2都是类似结构,查询出来的sql如何写呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这样??select id,name from table1 union allselect id,name form table2 去掉重复的:select id,name from table1 union select id,name form table2 不去掉重复的:select id,name from table1 union all select id,name form table2 select id,name from table1 union all select id,name form table2 此处需要注意,显示的列内容类型与数量要相同 这样的数据如何更新? 数据库还原 在SQL Server 2005中创建的数据表怎么才能在SQL Server 2000中使用? 前缀数目超过3怎么办?求救. SQL一点小问题,高手请进 临时表有什么办法删除掉?比较急 我想在SQL里面得到两个datetime型变量之间的差(相差多少天),能实现吗?谢谢 热备份,恢复后的问题。 一个处理字符串的存储过程,调不出来,高手帮助???·!!··#! 在存储过程中怎样得到新Insert记录的主键啊(uniqueidentifier类型)急 求!_取表中所有数据最后三天的数据 两个已存在的表A和B,如何将A表所有列数据记录插入表B而不用列出所有字段名
select id,name form table2
去掉重复的:
select id,name from table1
union
select id,name form table2
不去掉重复的:
select id,name from table1
union all
select id,name form table2
union all
select id,name form table2 此处需要注意,显示的列内容类型与数量要相同