sql語句,請教。。高手指點

2023-01-17 15:20:53 字數 704 閱讀 4591

1樓:

select t1.*,isnull(t2.b2,0) from 表a t1 left join 表b t2 on t1.t=t2.t

union all

select t2.t,isnull(t1.a1,0),t2.

b2 from 表a t1 right join 表b t2 on t1.t=t2.t where t1.

t is null

2樓:

select t,sum(a1) a1, sum(b2) b2from(

select t,a1,0 as b2

from 表a

union

select t,0 as a1,b2

from 表b

) cgroup by t

3樓:匿名使用者

select t=isnull(a.t,b.t),a1=isnull(a1,0),b1=isnull(b1,0)

from a full join b on a.t=b.t

4樓:

select isnull(a.t,b.t) as t,isnull(a.

a1,0) as a1,isnull(b.b2,0) as b2 from a full outer join b on a.t=b.t

請教SQL語句,請教一個SQL語句

select a.b.from comment a inner join reply b on a.writer b.writer and a.writer 張三 select from select from commentunion select from reply where writer ...

求sql語句,高手進

sql語句 查詢語句 select from table select from table where 條件1 數值 and 條件2 數值 select from table where id in select id from table 兩表關聯 select a.a,b.b,c.c from...

初戀,急需高手指點,高手指點,初1的初戀

沒有經濟基礎學人拍拖根本就是自討苦吃 最快的辦法是直接甩給她1000萬。如果不成 1,表面上不要太拿女孩當回事 2,心裡面喜歡就成了,別表現出來 3,多向她求助 4,學會給人驚喜 5,展示自己的特長 6,繼續給她安全感謝 7,尋找能單獨接觸的機會,向她學習。8,表現得笨笨的 9,實實在在的 10,別...