sql表並列
發布時間: 2023-03-05 00:20:14
① sql語句將兩個查詢結果並列輸出
如果是2個SQL語句的話。如果列名都一樣,使用UNIONALL就可以了。例如select*from表1UNIONALLselect*from表2就可以了。
② SQL 搜索數據相加 並列顯示
select sum(分數) from 表 where 日期=day
select sum(分數) from 表 where 日期=month
select sum(分數) from 表 where 日期=year
③ sql查詢(並列)
select uname,uscore,uobject
from Stu_subject
where uscore in
(select distinct top 3 uscore from Stu_subject where uscore > 72 order by uscore desc)
order by uscore desc
你這個語句要報錯的吧!~ORACLE是要報錯的~MSSQL不會報錯?沒試過~
熱點內容