摘要:
SQLServer2005通过intersect,union,except和三个关键字对应交、并、差三种集合运算详细如下use tempdb go if (object_id ('t1' ) is not null ) drop table t1 if (object_id ('t2' ) is not null ) drop table t2 go create table t1 (a int ) insert into t1 select 1 union select 2 union select 3 create table t2 (a int ) ins 阅读全文
摘要:
select S_ID,P_ID,P_Url,Users from (select S_ID,P_ID,P_Url from T_Test) A outer apply--右加字段给主表(select Users =Replace(Replace((select U_User a from R_Te... 阅读全文