關於oracle中返回最大值相關行的問題 50

時間 2025-06-16 06:30:22

關於oracle中返回最大值相關行的問題

1樓:網友

select ,,from 表名蔽鄭歷 a

join (select gid,max(insertdate) 'date'巨集搜 from 表叢談名 group by gid) b on and

oracle 單子行返回多行

2樓:網友

提示都說了,單行子查詢返回多行,說明子查詢中不能返回多行資料,在前面加個distinct試下。

3樓:流風子云

是唯一的嗎? select * from c_visit where msisdn='123' 查詢看看。

oracle裡面怎麼選取最大值?

4樓:賓士

select name

from employee

where date=(select max(date) from employee);

-以上,希望對你有所幫助。

5樓:卡卡亞索隆

後面跟乙個子查詢,把max(data)查出來 select max(date) from employee

也就是where date=子查詢。

select name from employeewhere date=(select max(date) from employee)

oracle 返回多行子查詢

6樓:厙曼冬

split函式傳入的是使用固定分隔符分割的字元,返回結果為多行,根據你的問題,你直接select name from student不就行了嗎。

7樓:網友

你是想把所有的名字都輸出的話就直接select name form student 不就行了?

查詢oracle分組查詢,最大值的記錄?

8樓:網友

這個題目真虎人,我還專門建了個表給你做的:

select * from test a where max( from test b where

呵呵 你試一下吧。

9樓:網友

你意思是查詢出最大時間的id嗎?可以這樣實現:

select id from zzz where time = (select max(time) from zzz)

如果你要實現的是查詢出每個種類中最大的更新時間的id,看看是否要這樣的結果:

select id,type,max(time) from zzz where exists (select max(time) from zzz group by type) group by type,id

10樓:

select *

from 表名 a,select 種類,max(更新時間) as 最後更新 from 表名 group by 種類) b

where a.種類=b.種類。

and a.更新時間=b.最後更新。

上面語句保證達到你的要求,但不一定最優。

oracle序列號達到最大值(預設最大值)怎麼辦?

11樓:風月無邊

一般情況下,只有儲存一些小資料的時候才會使用number型別的序列號,當資料量比較大的時候,就會使用varchar2(32)型別的序列號。在中有乙個自動生成乙個32位字串的靜態方法。這個方法號稱三百年內不會出現重複的字串,所以不用擔心的。

12樓:網友

你這個沒涉及實際沒啥意義,就像db2的bigint 19位整數就能滿足向移動這樣大公司一省的業務需求,而 oracle的number可以設定到38位!只要不是面向十億以上基數且資訊量別大的業務不可能不夠用,說句不好聽的,專門拿乙個伺服器往表裡插值不是一天兩天的事。

13樓:網友

沒有試過,應該會報錯吧。

oracle中仰某個字段裡面最大值的記錄的sql語句怎

1 建立測試表,create table test max id number,value number 2 插入測試資料 insert into test max values 1,12 insert into test max values 2,100 insert into test max ...

c 問題,數中求最大值,c 問題,三個數中求最大值

皋菡 c 提供一種高效率的方法,即在編譯時將呼叫的 直接嵌入到主呼叫函式中,而不是將流程轉出去,這種嵌入到主呼叫函式的函式稱為 內建函式 inlie function,又稱為內建函式 include using namespace std inline int max int,int,int 宣告函...

excel中如何設定最大值減去最小值

slai 楓 一組資料最大值的公式 不連續區域 max a,b,c,d,e 連續區域 max a1 a100 一組資料最大值的公式 不連續區域 min a,b,c,d,e 連續區域 min a1 a100 最大值減去最小值公式 max a,b,c,d,e min a,b,c,d,e 或 max a1...